From ae1c809a2de4d326571b2f086854feb70c35fdae Mon Sep 17 00:00:00 2001 From: Ondrej Pokorny Date: Sat, 14 Aug 2021 07:40:47 +0200 Subject: [PATCH] Fix TFPHTTPConnectionThread.Execute repeat loop --- packages/fcl-web/src/base/fphttpserver.pp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fcl-web/src/base/fphttpserver.pp b/packages/fcl-web/src/base/fphttpserver.pp index ed4ee068c3..a9f100b26e 100644 --- a/packages/fcl-web/src/base/fphttpserver.pp +++ b/packages/fcl-web/src/base/fphttpserver.pp @@ -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