src/Pool.php
protected function createCleanupTimer()
    {
        if (!isset($this->clientTtl)) {
            return;
        }
        $this->_clientsCleanupTimer = $this->loop->addPeriodicTimer(3, function($timer) {
            $expireTime = time() - $this->clientTtl;
            foreach ($this->_clients as $client) {
                if ($client->createdAt < $expireTime) {
                    $client->clientClose();
                }
            }
        });
    }
protected function createCleanupTimer()
    {
        if (!isset($this->clientTtl)) {
            return;
        }
        $this->_clientsCleanupTimer = $this->loop->addPeriodicTimer(3, function($timer) {
            $expireTime = time() - $this->clientTtl;
            foreach ($this->_clients as $client) {
                if ($client->createdAt < $expireTime) {
                    $client->clientClose();
                }
            }
        });
    }
protected function createCleanupTimer ( ) { if ( ! isset ( $ this -> clientTtl ) ) { return ; } $ this -> _clientsCleanupTimer = $ this -> loop -> addPeriodicTimer ( 3 , function ( $ timer ) { $ expireTime = time ( ) - $ this -> clientTtl ; foreach ( $ this -> _clients as $ client ) { if ( $ client -> createdAt < $ expireTime ) { $ client -> clientClose ( ) ; } } } ) ; }
Create cleanup timer if Client TTL is configured
Create cleanup timer if Client TTL is configured