From 331ca46d7507f5b116d535c94c0444fdc79b8a3f Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 23 May 2016 14:12:32 -0700 Subject: [PATCH] Fix websocket event name Fixes #798 // FREEBIE --- js/libtextsecure.js | 2 +- libtextsecure/websocket-resources.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 102434b9..05707f29 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37164,7 +37164,7 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ disconnect : opts.keepalive.disconnect }); var resetKeepAliveTimer = keepalive.reset.bind(keepalive); - socket.addEventListener('connect', resetKeepAliveTimer); + socket.addEventListener('open', resetKeepAliveTimer); socket.addEventListener('message', resetKeepAliveTimer); socket.addEventListener('close', keepalive.stop.bind(keepalive)); } diff --git a/libtextsecure/websocket-resources.js b/libtextsecure/websocket-resources.js index 13c83392..82391841 100644 --- a/libtextsecure/websocket-resources.js +++ b/libtextsecure/websocket-resources.js @@ -135,7 +135,7 @@ disconnect : opts.keepalive.disconnect }); var resetKeepAliveTimer = keepalive.reset.bind(keepalive); - socket.addEventListener('connect', resetKeepAliveTimer); + socket.addEventListener('open', resetKeepAliveTimer); socket.addEventListener('message', resetKeepAliveTimer); socket.addEventListener('close', keepalive.stop.bind(keepalive)); }