public void disconnect ( ) { reconnect = false ; websocket . get ( ) . sendClose ( WebSocketCloseReason . DISCONNECT . getNumericCloseCode ( ) ) ; // cancel heartbeat timer if within one minute no disconnect event was dispatched api . getThreadPool ( ) . getDaemonScheduler ( ) . schedule ( ( ) -> heartbeatTimer . updateAndGet ( future -> { if ( future != null ) { future . cancel ( false ) ; } return null ; } ) , 1 , TimeUnit . MINUTES ) ; }
Disconnects from the websocket .