protected void dispose ( ) { final WebSocket currentWebSocket = webSocket ; if ( currentWebSocket != null && currentWebSocket . isOpen ( ) ) { try { currentWebSocket . disconnect ( WebSocketCloseCode . AWAY . getCode ( ) ) ; } catch ( final Exception exception ) { postErrorEvent ( exception ) ; } } }
Removes current web socket instance .