Skip to content

Commit ed4f3d9

Browse files
Fixes in AcceptThread method (#89)
1 parent 14f9dfe commit ed4f3d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/nanoFramework.System.Net.Http/Http/System.Net.HttpListener.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ private void AcceptThreadFunc()
367367
}
368368
catch (SocketException)
369369
{
370-
if (retry > 5)
370+
if (++retry > 5)
371371
{
372372
// If request to stop listener flag is set or locking call is interupted return
373373
// On exception we stop the service and record the exception.
@@ -420,7 +420,7 @@ private void AcceptThreadFunc()
420420
netStream.ReadTimeout = 10000;
421421
}
422422
}
423-
catch(SocketException)
423+
catch
424424
{
425425
if (netStream != null)
426426
{

0 commit comments

Comments
 (0)