Browse Source

* Patch to fix issue #40351

Michaël Van Canneyt 2 years ago
parent
commit
656254a984
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/fcl-net/src/ssockets.pp

+ 4 - 3
packages/fcl-net/src/ssockets.pp

@@ -928,9 +928,10 @@ begin
     Result := winsock2.Select(FSocket + 1, @FDS, @FDS, @FDS, @TimeV) > 0;
 {$endif}
 {$endif}
-    If not Result then
-      DoOnIdle;
-  Until Result or (Not FAccepting);
+    If Result then
+      break;
+    DoOnIdle;
+  Until (Not FAccepting);
 end;
 
 procedure TSocketServer.Listen;