Sulu\Bundle\PreviewBundle\Websocket\PreviewMessageHandler::onClose PHP Method

onClose() public method

public onClose ( Ratchet\ConnectionInterface $conn, MessageHandlerContext $context )
$conn Ratchet\ConnectionInterface
$context Sulu\Component\Websocket\MessageDispatcher\MessageHandlerContext
    public function onClose(ConnectionInterface $conn, MessageHandlerContext $context)
    {
        $this->preview->stop($context->get('previewToken'));
        $context->clear();
    }