mirror of
https://github.com/django/daphne.git
synced 2025-08-04 02:20:08 +03:00
Fix error code [1006] if protocols is undefined
(#735)
This commit is contained in:
parent
f34ca1cd2b
commit
3111f3b8ac
|
@ -283,7 +283,10 @@ var WebSocketBridge = function () {
|
|||
_url = url;
|
||||
}
|
||||
}
|
||||
this.socket = new _reconnectingWebsocket2.default(_url, protocols, options);
|
||||
// Some mobile devices (eg: HTC M8, SAMSUNG Galaxy S8) will get error code
|
||||
// [1006] during handshake if `protocols` is `undefined`.
|
||||
var _protocols = protocols === undefined ? '' : protocols;
|
||||
this.socket = new _reconnectingWebsocket2.default(_url, _protocols, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -72,7 +72,8 @@ var WebSocketBridge = function () {
|
|||
_url = url;
|
||||
}
|
||||
}
|
||||
this.socket = new _reconnectingWebsocket2.default(_url, protocols, options);
|
||||
var _protocols = protocols === undefined ? '' : protocols;
|
||||
this.socket = new _reconnectingWebsocket2.default(_url, _protocols, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,7 +50,10 @@ export class WebSocketBridge {
|
|||
_url = url;
|
||||
}
|
||||
}
|
||||
this.socket = new ReconnectingWebSocket(_url, protocols, options);
|
||||
// Some mobile devices (eg: HTC M8, SAMSUNG Galaxy S8) will get error code
|
||||
// [1006] during handshake if `protocols` is `undefined`.
|
||||
const _protocols = protocols === undefined ? '' : protocols;
|
||||
this.socket = new ReconnectingWebSocket(_url, _protocols, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user