ws_closed_early = function (evt) {
            if (already_called_onclose) {
                return;
            }
            already_called_onclose = true;
            if (!evt.wasClean) {
                // If the websocket was closed early, that could mean
                // that the kernel is actually dead. Try getting
                // information about the kernel from the API call --
                // if that fails, then assume the kernel is dead,
                // otherwise just follow the typical websocket closed
                // protocol.
                that.get_info(function () {
                    that._ws_closed(ws_host_url, false);
                }, function () {
                    that.events.trigger('kernel_dead.Kernel', {kernel: that});
                    that._kernel_dead();
                });
            }
        }
Start the websocket channels.
Will stop and restart them if they already exist.

@function start_channels