disconnect() {
        if (this.heartbeatInterval) {
            clearInterval(this.heartbeatInterval);
        }

        if (!this.ws) { return; }

        if (this.ws.readyState === WebSocket.OPEN) {
            this.ws.close(1000);
        }

        this.ws = null;
    }
/**
     * Disconnect from the websocket
     *
     * @memberof Client
     */
Disconnect from the websocket
@memberof Client
Disconnect from the websocket @memberof Client
disconnect() {
        if (this.heartbeatInterval) {
            clearInterval(this.heartbeatInterval);
        }
        if (!this.ws) { return; }
        if (this.ws.readyState === WebSocket.OPEN) {
            this.ws.close(1000);
        }
        this.ws = null;
    }
disconnect ( ) { if ( this . heartbeatInterval ) { clearInterval ( this . heartbeatInterval ) ; } if ( ! this . ws ) { return ; } if ( this . ws . readyState === WebSocket . OPEN ) { this . ws . close ( 1000 ) ; } this . ws = null ; }
Disconnect from the websocket
 @memberof Client
Disconnect from the websocket @memberof Client