Aerys\Websocket\Rfc6455Endpoint::onAppError PHP Method

onAppError() private method

private onAppError ( $clientId, Throwable $e ) : Generator
$e Throwable
return Generator
    private function onAppError($clientId, \Throwable $e) : \Generator
    {
        $this->logger->error($e->__toString());
        $code = Code::UNEXPECTED_SERVER_ERROR;
        $reason = "Internal server error, aborting";
        if (isset($this->clients[$clientId])) {
            // might have been already unloaded + closed
            yield from $this->doClose($this->clients[$clientId], $code, $reason);
        }
    }