Skip to content

Commit

Permalink
Respect settings and terminate quicker
Browse files Browse the repository at this point in the history
  • Loading branch information
NewEraCracker committed Sep 30, 2017
1 parent 6eb2709 commit 02db549
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cHLDos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ private void bw_DoWork (object sender, EventArgs e)

State = ReqState.Ready;

for (int i = 0; i < _PingsPerThread; i++)
for (int i = 0; i < _PingsPerThread && this.IsFlooding; i++)
{
State = ReqState.Connecting;
try
Expand All @@ -629,7 +629,7 @@ private void bw_DoWork (object sender, EventArgs e)
State = ReqState.Completed;
}

if (Delay > 0)
if (this.IsFlooding && Delay > 0)
{
System.Threading.Thread.Sleep(Delay);
}
Expand Down

0 comments on commit 02db549

Please sign in to comment.