PHPDaemon\Network\Connection::onFailureEv PHP Method

onFailureEv() public method

Called when the connection failed
public onFailureEv ( EventBufferEvent $bev = null ) : void
$bev EventBufferEvent
return void
    public function onFailureEv($bev = null)
    {
        try {
            if (!$this->connected && !$this->failed) {
                $this->failed = true;
                $this->onFailure();
            }
            $this->connected = false;
        } catch (\Exception $e) {
            Daemon::uncaughtExceptionHandler($e);
        }
    }