mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 22:29:23 +02:00
Fix TFPHTTPConnectionThread.Execute repeat loop
This commit is contained in:
parent
964a9839d1
commit
ae1c809a2d
@ -569,7 +569,7 @@ begin
|
||||
Try
|
||||
if FSetupSocket then
|
||||
begin
|
||||
SetupSocket;
|
||||
SetupSocket;
|
||||
FSetupSocket:=False;
|
||||
end;
|
||||
// Read headers.
|
||||
@ -644,8 +644,8 @@ begin
|
||||
and not Connection.Socket.CanRead(Connection.KeepAliveTimeout) then
|
||||
break;
|
||||
|
||||
FConnection.HandleRequest;
|
||||
until not (Terminated and FConnection.EnableKeepAlive and FConnection.KeepAlive and (FConnection.Socket.LastError=0));
|
||||
FConnection.HandleRequest;
|
||||
until not (not Terminated and FConnection.EnableKeepAlive and FConnection.KeepAlive and (FConnection.Socket.LastError=0));
|
||||
finally
|
||||
FreeAndNil(FConnection);
|
||||
if Assigned(FThreadList) then
|
||||
@ -973,7 +973,7 @@ begin
|
||||
try
|
||||
for I:= ThreadList.Count-1 downto 0 do
|
||||
try
|
||||
CloseSocket(TFPHTTPConnectionThread(ThreadList[I]).Connection.Socket.Handle);
|
||||
CloseSocket(TFPHTTPConnectionThread(ThreadList[I]).Connection.Socket.Handle);
|
||||
except
|
||||
// ignore exceptions during CloseSocket
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user