diff --git a/channels/static/channels/js/websocketbridge.js b/channels/static/channels/js/websocketbridge.js index d7b2845..dd4af1a 100644 --- a/channels/static/channels/js/websocketbridge.js +++ b/channels/static/channels/js/websocketbridge.js @@ -115,7 +115,12 @@ var ReconnectingWebsocket = function (url, protocols, options) { var connect = function () { log('connect'); var oldWs = ws; - ws = new config.constructor(url, protocols); + if (protocols === undefined) { + ws = new config.constructor(url); + } else { + ws = new config.constructor(url, protocols); + } + connectingTimeout = setTimeout(function () { log('timeout'); ws.close();