fcl-net: no ESocketError after closing the connection

This commit is contained in:
mattias 2022-02-25 19:15:22 +01:00
parent 6b8ab2c4d2
commit d36761f4a4
2 changed files with 5 additions and 4 deletions

View File

@ -856,7 +856,10 @@ begin
Result:=Nil;
NewSocket:=Accept;
if (NewSocket<0) then
Raise ESocketError.Create(seAcceptFailed,[Socket,SocketError]);
if not FAccepting then
exit
else
Raise ESocketError.Create(seAcceptFailed,[Socket,SocketError]);
If FAccepting and DoConnectQuery(NewSocket) Then
Result:=SockToStream(NewSocket)
else

View File

@ -164,8 +164,6 @@ type
{$INTERFACES CORBA}
{ TWSTransport }
{ IWSTransport }
IWSTransport = Interface
@ -1635,7 +1633,7 @@ begin
else if ReadMessage then
Result:=irOK
else
Result:=irClose
Result:=irClose;
end;
constructor TWSClientConnection.Create(aOwner: TComponent; aTransport: TWSClientTransport; aOptions : TWSOptions);