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)); }