mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 23:49:40 +02:00
fcl-web: TCustomWSServer.RemoveConnection: call DoDisconnect on disconnect
This commit is contained in:
parent
0b24d5f92e
commit
87857252a4
@ -592,15 +592,14 @@ end;
|
||||
|
||||
procedure TCustomWSServer.RemoveConnection(AConnection: TWSServerConnection;aDoDisconnect: Boolean);
|
||||
begin
|
||||
if not aDoDisconnect then
|
||||
DoDisconnect(aConnection)
|
||||
else
|
||||
if aDoDisconnect then
|
||||
try
|
||||
aConnection.Disconnect;
|
||||
except
|
||||
on E : Exception do
|
||||
HandleError(aConnection,E);
|
||||
end;
|
||||
DoDisconnect(aConnection);
|
||||
Connections.Remove(aConnection);
|
||||
aConnection.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user