Aerys\Websocket\Rfc6455Endpoint::tryAppOnClose PHP Method

tryAppOnClose() private method

private tryAppOnClose ( integer $clientId, $code, $reason ) : Generator
$clientId integer
return Generator
    private function tryAppOnClose(int $clientId, $code, $reason) : \Generator
    {
        try {
            $onCloseResult = $this->application->onClose($clientId, $code, $reason);
            if ($onCloseResult instanceof \Generator) {
                $onCloseResult = (yield from $onCloseResult);
            }
        } catch (\Throwable $e) {
            yield from $this->onAppError($clientId, $e);
        }
    }