You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$loop = React\EventLoop\Factory::create();
$socket = new React\Socket\Server(sprintf('127.0.0.1:%s', $this->port), $loop);
$socket->on('connection', function (React\Socket\ConnectionInterface $connection) use ($loop, $socket, $conn) {
$connection->on('data', function ($data) use ($connection, $loop, $socket) {
});
}, function (Exception $error) {
var_dump($error);
});
$loop->run();
after about a 5 minute idle time if i try to connect to it, then it connects for a second and disconnects the socket server is there any socket timeout or a way to keep it running in an infinite loop
The text was updated successfully, but these errors were encountered:
Thank You @WyriHaximus for your response the problem was with max_execution_time it was limited to 120 seconds so the script always stopped adding set_time_limit(0); or ini_set('max_execution_time', '0'); fixes the issue
Thank you once again :)
I have a simple socket server
$loop = React\EventLoop\Factory::create();
$socket = new React\Socket\Server(sprintf('127.0.0.1:%s', $this->port), $loop);
$socket->on('connection', function (React\Socket\ConnectionInterface $connection) use ($loop, $socket, $conn) {
$connection->on('data', function ($data) use ($connection, $loop, $socket) {
});
}, function (Exception $error) {
var_dump($error);
});
$loop->run();
after about a 5 minute idle time if i try to connect to it, then it connects for a second and disconnects the socket server is there any socket timeout or a way to keep it running in an infinite loop
The text was updated successfully, but these errors were encountered: