mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 23:19:18 +02:00
Ignore exceptions
This commit is contained in:
parent
da10b8141c
commit
c4e2029179
@ -497,7 +497,10 @@ begin
|
|||||||
IOTimeout := TimeOut;
|
IOTimeout := TimeOut;
|
||||||
FHandler.Recv(B,0);
|
FHandler.Recv(B,0);
|
||||||
Result := FHandler.FLastError=0;
|
Result := FHandler.FLastError=0;
|
||||||
IOTimeout := lTM;
|
try
|
||||||
|
IOTimeout := lTM;
|
||||||
|
except
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TSocketStream.Read (Var Buffer; Count : Longint) : longint;
|
Function TSocketStream.Read (Var Buffer; Count : Longint) : longint;
|
||||||
|
@ -656,11 +656,11 @@ begin
|
|||||||
try
|
try
|
||||||
repeat
|
repeat
|
||||||
FConnection.HandleRequest;
|
FConnection.HandleRequest;
|
||||||
if Connection.EnableKeepAlive and Connection.KeepAlive
|
if not Terminated and Connection.EnableKeepAlive and Connection.KeepAlive
|
||||||
and not Connection.Socket.CanRead(Connection.KeepAliveTimeout) then
|
and not Connection.Socket.CanRead(Connection.KeepAliveTimeout) then
|
||||||
break;
|
break;
|
||||||
FConnection.HandleRequest;
|
FConnection.HandleRequest;
|
||||||
until not (FConnection.EnableKeepAlive and FConnection.KeepAlive and (FConnection.Socket.LastError=0));
|
until not (Terminated and FConnection.EnableKeepAlive and FConnection.KeepAlive and (FConnection.Socket.LastError=0));
|
||||||
finally
|
finally
|
||||||
FreeAndNil(FConnection);
|
FreeAndNil(FConnection);
|
||||||
if Assigned(FThreadList) then
|
if Assigned(FThreadList) then
|
||||||
@ -988,7 +988,7 @@ begin
|
|||||||
try
|
try
|
||||||
for I:= ThreadList.Count-1 downto 0 do
|
for I:= ThreadList.Count-1 downto 0 do
|
||||||
try
|
try
|
||||||
CloseSocket(TFPHTTPConnectionThread(ThreadList[I]).Connection.Socket.Handle);
|
CloseSocket(TFPHTTPConnectionThread(ThreadList[I]).Connection.Socket.Handle);
|
||||||
except
|
except
|
||||||
// ignore exceptions during CloseSocket
|
// ignore exceptions during CloseSocket
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user