瀏覽代碼

* partial patch from #12040. One of the problems was already fixed earlier.

git-svn-id: trunk@13499 -
marco 16 年之前
父節點
當前提交
c79a31fabf
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/fcl-net/src/ssockets.pp

+ 2 - 1
packages/fcl-net/src/ssockets.pp

@@ -333,6 +333,7 @@ Var
 
 begin
   FAccepting := True;
+  NoConnections := 0;
   Listen;
   Repeat
     Repeat
@@ -341,7 +342,7 @@ begin
         If NewSocket>=0 then
           begin
           Inc (NoConnections);
-          If DoConnectQuery(NewSocket) Then
+          If FAccepting and DoConnectQuery(NewSocket) Then
             begin
             Stream:=SockToStream(NewSocket);
             DoConnect(Stream);