mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 10:19:28 +02:00
* Patch so uninitialized sockets are not closed
git-svn-id: trunk@11673 -
This commit is contained in:
parent
65f217ed02
commit
46f9928054
@ -42,6 +42,7 @@ type
|
||||
|
||||
TSocketStream = class(THandleStream)
|
||||
Private
|
||||
FSocketInitialized : Boolean;
|
||||
FSocketOptions : TSocketOptions;
|
||||
Procedure GetSockOptions;
|
||||
Procedure SetSocketOptions(Value : TSocketOptions);
|
||||
@ -215,11 +216,13 @@ Constructor TSocketStream.Create (AHandle : Longint);
|
||||
|
||||
begin
|
||||
Inherited Create(AHandle);
|
||||
FSocketInitialized := true;
|
||||
GetSockOptions;
|
||||
end;
|
||||
|
||||
destructor TSocketStream.Destroy;
|
||||
begin
|
||||
if FSocketInitialized then
|
||||
{$ifdef netware}
|
||||
CloseSocket(Handle);
|
||||
{$else}
|
||||
|
Loading…
Reference in New Issue
Block a user