Bladeren bron

* more complete fix for bug #24802 (use SocketClose instead of FileClose on all platforms)

git-svn-id: trunk@25197 -
Tomas Hajny 12 jaren geleden
bovenliggende
commit
9c68645784
2 gewijzigde bestanden met toevoegingen van 1 en 9 verwijderingen
  1. 1 1
      packages/fcl-net/src/fpsock.pp
  2. 0 8
      packages/fcl-net/src/ssockets.pp

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

@@ -209,7 +209,7 @@ Const
 
 destructor TSocketStream.Destroy;
 begin
-  FileClose(Handle);
+  SocketClose(Handle);
   inherited Destroy;
 end;
 

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

@@ -246,11 +246,7 @@ end;
 destructor TSocketStream.Destroy;
 begin
   if FSocketInitialized then
-  {$if  defined(netware) or defined(mswindows)}
   CloseSocket(Handle);
-  {$else}
-  FileClose(Handle);
-  {$ifend}
   inherited Destroy;
 end;
 
@@ -340,11 +336,7 @@ Procedure TSocketServer.Close;
 
 begin
   If FSocket<>-1 Then
-    {$ifdef netware}
     CloseSocket(FSocket);
-    {$else}
-    FileClose(FSocket);
-    {$endif}
   FSocket:=-1;
 end;