mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 07:09:29 +02:00
* Patch from Andrew Haines: do not send close connection message if already closed
This commit is contained in:
parent
23d61350bd
commit
4f054f4097
@ -475,7 +475,7 @@ procedure TCustomWebsocketClient.Disconnect(SendClose : boolean = true);
|
||||
begin
|
||||
if Not Active then
|
||||
Exit;
|
||||
if SendClose then
|
||||
if SendClose and (Connection.CloseState <> csClosed) then
|
||||
Connection.Close('');
|
||||
if Assigned(MessagePump) then
|
||||
MessagePump.RemoveClient(Connection);
|
||||
|
Loading…
Reference in New Issue
Block a user