Files
archived-frankenphp/testdata/connectionStatusLog.php
Rob Landers 3abda4fbb6 feat: handle aborted connection (#95)
* Handle aborted connection

* Handle when writing as well

* return bytes written

* optimize return

* remove goroutine

* fix style

* Add tests

* add missing newline
2022-11-09 15:09:45 +01:00

18 lines
322 B
PHP

<?php
ignore_user_abort(true);
require_once __DIR__.'/_executor.php';
return function () {
if(isset($_GET['finish'])) {
frankenphp_finish_request();
}
echo 'hi';
if(isset($_GET['flush'])) {
flush();
}
$status = (string) connection_status();
error_log("request {$_GET['i']}: " . $status);
};