Skip to content

Commit 0977247

Browse files
committed
Fixed crash bug on PHP 8.1.
1 parent 9c966cc commit 0977247

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

web_server.php

+6
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,9 @@ public function Wait($timeout = false, $readfps = array(), $writefps = array(),
723723
{
724724
if ($client->requests) $result["removed"][$id] = array("result" => $result2, "client" => $client);
725725

726+
// Client was closed by the underlying library.
727+
$client->fp = false;
728+
726729
$this->RemoveClient($id);
727730
}
728731
else if ($client->requestcomplete === false && $client->httpstate["state"] !== "request_line" && $client->httpstate["state"] !== "headers")
@@ -845,6 +848,9 @@ public function Wait($timeout = false, $readfps = array(), $writefps = array(),
845848

846849
$result["removed"][$id] = array("result" => $result2, "client" => $client);
847850

851+
// Client was closed by the underlying library.
852+
$client->fp = false;
853+
848854
$this->RemoveClient($id);
849855
}
850856
}

0 commit comments

Comments
 (0)