src/RequestHandler.php
public function slaveConnectFailed(\Exception $e)
    {
        $this->slave->release();

        $this->verboseTimer(function ($took) use ($e) {
            return sprintf(
                '<error>Connection to worker %d failed. Try #%d, took %.3fs ' .
                '(timeout %ds). Error message: [%d] %s</error>',
                $this->slave->getPort(),
                $this->redirectionTries,
                $took,
                $this->timeout,
                $e->getCode(),
                $e->getMessage()
            );
        }, true);

        // should not get any more access to this slave instance
        unset($this->slave);

        // try next free slave, let loop schedule it (stack friendly)
        // after 10th retry add 10ms delay, keep increasing until timeout
        $delay = min($this->timeout, floor($this->redirectionTries / 10) / 100);
        $this->loop->addTimer($delay, [$this, 'getNextSlave']);
    }
public function slaveConnectFailed(\Exception $e)
    {
        $this->slave->release();

        $this->verboseTimer(function ($took) use ($e) {
            return sprintf(
                '<error>Connection to worker %d failed. Try #%d, took %.3fs ' .
                '(timeout %ds). Error message: [%d] %s</error>',
                $this->slave->getPort(),
                $this->redirectionTries,
                $took,
                $this->timeout,
                $e->getCode(),
                $e->getMessage()
            );
        }, true);

        // should not get any more access to this slave instance
        unset($this->slave);

        // try next free slave, let loop schedule it (stack friendly)
        // after 10th retry add 10ms delay, keep increasing until timeout
        $delay = min($this->timeout, floor($this->redirectionTries / 10) / 100);
        $this->loop->addTimer($delay, [$this, 'getNextSlave']);
    }
public function slaveConnectFailed ( \ Exception $ e ) { $ this -> slave -> release ( ) ; $ this -> verboseTimer ( function ( $ took ) use ( $ e ) { return sprintf ( '<error>Connection to worker %d failed. Try #%d, took %.3fs ' . '(timeout %ds). Error message: [%d] %s</error>' , $ this -> slave -> getPort ( ) , $ this -> redirectionTries , $ took , $ this -> timeout , $ e -> getCode ( ) , $ e -> getMessage ( ) ) ; } , true ) ; // should not get any more access to this slave instance unset ( $ this -> slave ) ; // try next free slave, let loop schedule it (stack friendly) // after 10th retry add 10ms delay, keep increasing until timeout $ delay = min ( $ this -> timeout , floor ( $ this -> redirectionTries / 10 ) / 100 ) ; $ this -> loop -> addTimer ( $ delay , [ $ this , 'getNextSlave' ] ) ; }
Handle failed slave connection

Connection may fail because of timeouts or crashed or dying worker.
Since the worker may only very busy or dying it's put back into the
available worker list. If it is really dying it will be removed from the
worker list by the connection:close event.

@param \Exception $e slave connection error
Handle failed slave connection