mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-02-25 07:08:40 +01:00
disable KeepAlive flag in CloseConnectionSocket to close hanging keep-alive connections
This commit is contained in:
parent
0dbf40a24c
commit
a1a30876d5
@ -652,7 +652,10 @@ end;
|
||||
procedure TFPHTTPServerConnectionListHandler.CloseConnectionSocket(aConnection: TFPHTTPConnection; var aContinue: boolean);
|
||||
begin
|
||||
if Not aConnection.IsUpgraded then
|
||||
begin
|
||||
sockets.CloseSocket(aConnection.Socket.Handle);
|
||||
aConnection.FKeepAlive:=False; // to exit the keep-alive loop for hanging sockets
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFPHTTPServerConnectionListHandler.Foreach(aIterator: TConnectionIterator);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user