mirror of
https://github.com/django/daphne.git
synced 2025-08-04 02:20:08 +03:00
Fixed: some device will get error code [1006] when handshake if protocols is undefined. (#691)
This commit is contained in:
parent
c0138e8dd9
commit
ed32c71d90
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user