Browse Source

* close socket if not accepted. Patch from Mantis 12675 by S. Meyer.

git-svn-id: trunk@13128 -
marco 16 years ago
parent
commit
828afdf74c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/fcl-net/src/ssockets.pp

+ 5 - 0
packages/fcl-net/src/ssockets.pp

@@ -346,6 +346,11 @@ begin
             Stream:=SockToStream(NewSocket);
             DoConnect(Stream);
             end
+          else
+            begin
+            CloseSocket(NewSocket);
+            NewSocket:=-1;
+            end;          
           end
       except
         On E : ESocketError do