close = function () {
            if (that.ws && that.ws.readyState === WebSocket.CLOSED) {
                that.ws = null;
            }
        }
Close the websocket. After successful close, the value
in `this.ws` will be null.

@function stop_channels