mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 14:09:17 +02:00
* Fixed case where connection is closed gracefully (Bug ID 23386)
git-svn-id: trunk@23403 -
This commit is contained in:
parent
2b300ec2b4
commit
cce67cf5ae
@ -962,6 +962,7 @@ begin
|
||||
SetupSocket(FIAddress,FAddressLength)
|
||||
else
|
||||
Socket:=StdInputHandle;
|
||||
Repeat
|
||||
if FHandle=THandle(-1) then
|
||||
FHandle:=AcceptConnection;
|
||||
if FHandle=THandle(-1) then
|
||||
@ -980,14 +981,18 @@ begin
|
||||
OnIdle(Self);
|
||||
end;
|
||||
AFCGI_Record:=Read_FCGIRecord;
|
||||
if assigned(AFCGI_Record) then
|
||||
// If connection closed gracefully, we have nil.
|
||||
if Not Assigned(AFCGI_Record) then
|
||||
CloseConnection
|
||||
else
|
||||
try
|
||||
Result:=ProcessRecord(AFCGI_Record,ARequest,AResponse);
|
||||
Finally
|
||||
FreeMem(AFCGI_Record);
|
||||
AFCGI_Record:=Nil;
|
||||
end;
|
||||
until Result;
|
||||
until Result or (FHandle=THandle(-1));
|
||||
Until Result;
|
||||
end;
|
||||
|
||||
{ TCustomFCgiApplication }
|
||||
|
Loading…
Reference in New Issue
Block a user