Browse Source

InetSocket: fixed connect without timeout set

git-svn-id: trunk@39355 -
marcus 7 years ago
parent
commit
db43c69387
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-net/src/ssockets.pp

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

@@ -1117,7 +1117,7 @@ begin
   If (Res<0) then
     Raise ESocketError.Create(seConnectFailed, [Format('%s:%d',[FHost, FPort])]);
 {$IFDEF HAVENONBLOCKING}
-  If (Res=0) then
+  If (Res=0) and (ConnectTimeOut>0) then
     Raise ESocketError.Create(seConnectTimeOut, [Format('%s:%d',[FHost, FPort])]);
 {$ENDIF}
 end;