mirror of
https://github.com/django/daphne.git
synced 2025-08-04 10:30: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 () {
|
var connect = function () {
|
||||||
log('connect');
|
log('connect');
|
||||||
var oldWs = ws;
|
var oldWs = ws;
|
||||||
|
if (protocols === undefined) {
|
||||||
|
ws = new config.constructor(url);
|
||||||
|
} else {
|
||||||
ws = new config.constructor(url, protocols);
|
ws = new config.constructor(url, protocols);
|
||||||
|
}
|
||||||
|
|
||||||
connectingTimeout = setTimeout(function () {
|
connectingTimeout = setTimeout(function () {
|
||||||
log('timeout');
|
log('timeout');
|
||||||
ws.close();
|
ws.close();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user