|
|
|
@ -39400,6 +39400,7 @@ function generateKeys(count, progressCallback) {
|
|
|
|
|
if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
|
|
|
|
|
this.socket.close();
|
|
|
|
|
}
|
|
|
|
|
console.log('opening websocket');
|
|
|
|
|
this.socket = new WebSocket(
|
|
|
|
|
this.url.replace('https://', 'wss://').replace('http://', 'ws://')
|
|
|
|
|
+ '/v1/websocket/?login=' + encodeURIComponent(this.username)
|
|
|
|
@ -39408,6 +39409,7 @@ function generateKeys(count, progressCallback) {
|
|
|
|
|
|
|
|
|
|
this.socket.onclose = this.onclose.bind(this);
|
|
|
|
|
this.socket.onerror = this.onerror.bind(this);
|
|
|
|
|
this.socket.onconnect = this.onconnect.bind(this);
|
|
|
|
|
this.wsr = new WebSocketResource(this.socket, {
|
|
|
|
|
handleRequest: this.handleRequest.bind(this),
|
|
|
|
|
keepalive: { path: '/v1/keepalive', disconnect: true }
|
|
|
|
@ -39417,6 +39419,9 @@ function generateKeys(count, progressCallback) {
|
|
|
|
|
this.socket.close();
|
|
|
|
|
delete this.listeners;
|
|
|
|
|
},
|
|
|
|
|
onconnect: function() {
|
|
|
|
|
console.log('websocket connected');
|
|
|
|
|
},
|
|
|
|
|
onerror: function(error) {
|
|
|
|
|
console.log('websocket error', error);
|
|
|
|
|
this.socketError = error;
|
|
|
|
|