* Patch so uninitialized sockets are not closed

git-svn-id: trunk@11673 -
This commit is contained in:
michael 2008-08-31 15:01:05 +00:00
parent 65f217ed02
commit 46f9928054

View File

@ -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}