mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:29:42 +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)
|
TSocketStream = class(THandleStream)
|
||||||
Private
|
Private
|
||||||
|
FSocketInitialized : Boolean;
|
||||||
FSocketOptions : TSocketOptions;
|
FSocketOptions : TSocketOptions;
|
||||||
Procedure GetSockOptions;
|
Procedure GetSockOptions;
|
||||||
Procedure SetSocketOptions(Value : TSocketOptions);
|
Procedure SetSocketOptions(Value : TSocketOptions);
|
||||||
@ -215,11 +216,13 @@ Constructor TSocketStream.Create (AHandle : Longint);
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Inherited Create(AHandle);
|
Inherited Create(AHandle);
|
||||||
|
FSocketInitialized := true;
|
||||||
GetSockOptions;
|
GetSockOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TSocketStream.Destroy;
|
destructor TSocketStream.Destroy;
|
||||||
begin
|
begin
|
||||||
|
if FSocketInitialized then
|
||||||
{$ifdef netware}
|
{$ifdef netware}
|
||||||
CloseSocket(Handle);
|
CloseSocket(Handle);
|
||||||
{$else}
|
{$else}
|
||||||
|
Loading…
Reference in New Issue
Block a user