* Fixed case where connection is closed gracefully (Bug ID 23386)

git-svn-id: trunk@23403 -
This commit is contained in:
michael 2013-01-16 10:57:47 +00:00
parent 2b300ec2b4
commit cce67cf5ae

View File

@ -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 }