php-websocket icon indicating copy to clipboard operation
php-websocket copied to clipboard

Do not accept new connection after running for a while (+/- 1h)

Open raiviszel opened this issue 4 years ago • 1 comments

App do not accept new connections after running for a while. These connections which are already established - exchange with messages happens successfully, but after disconnect - it is not possible to connect anymore to server

this part is still alive:

public function run(): void
    {
        while (true) {
            echo count($this->allsockets)."|";
            $changed_sockets = $this->allsockets;
....

I have this issue with almost default example script: https://github.com/bloatless/php-websocket/blob/master/examples/server.php

Initially thought it is Raspberry Pi memory issue, but the same was tested with MacBook - and issue is the same. After restart - works again +/- 1h (test was done with 5 messages per sec approx.)

raiviszel avatar Jul 20 '21 19:07 raiviszel