From c8a76ab38e800f57b3a03d50f998269e665f8cf1 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 21 Sep 2015 10:20:19 -0700 Subject: [PATCH] Fix websocket event handler name // FREEBIE --- js/libtextsecure.js | 6 +++--- libtextsecure/message_receiver.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index cbc64a01..389dab34 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -39409,7 +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.socket.onopen = this.onopen.bind(this); this.wsr = new WebSocketResource(this.socket, { handleRequest: this.handleRequest.bind(this), keepalive: { path: '/v1/keepalive', disconnect: true } @@ -39419,8 +39419,8 @@ function generateKeys(count, progressCallback) { this.socket.close(); delete this.listeners; }, - onconnect: function() { - console.log('websocket connected'); + onopen: function() { + console.log('websocket open'); }, onerror: function(error) { console.log('websocket error', error); diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 07a5cf00..6658feab 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -34,7 +34,7 @@ this.socket.onclose = this.onclose.bind(this); this.socket.onerror = this.onerror.bind(this); - this.socket.onconnect = this.onconnect.bind(this); + this.socket.onopen = this.onopen.bind(this); this.wsr = new WebSocketResource(this.socket, { handleRequest: this.handleRequest.bind(this), keepalive: { path: '/v1/keepalive', disconnect: true } @@ -44,8 +44,8 @@ this.socket.close(); delete this.listeners; }, - onconnect: function() { - console.log('websocket connected'); + onopen: function() { + console.log('websocket open'); }, onerror: function(error) { console.log('websocket error', error);