Fix tests
This commit is contained in:
@@ -38429,11 +38429,13 @@ TextSecureWebSocket = function (url) {
|
||||
var reconnectSemaphore = 0;
|
||||
var reconnectTimeout = 1000;
|
||||
var socket;
|
||||
var calledClose = false;
|
||||
var socketWrapper = {
|
||||
onmessage : function() {},
|
||||
onclose : function() {},
|
||||
onerror : function() {},
|
||||
getStatus : function() { return socket.readyState; }
|
||||
getStatus : function() { return socket.readyState; },
|
||||
close : function() { calledClose = true; }
|
||||
};
|
||||
var error;
|
||||
|
||||
@@ -38454,7 +38456,7 @@ TextSecureWebSocket = function (url) {
|
||||
};
|
||||
|
||||
function onclose(e) {
|
||||
if (!error) {
|
||||
if (!error && !calledClose) {
|
||||
reconnectSemaphore--;
|
||||
setTimeout(connect, reconnectTimeout);
|
||||
}
|
||||
|
Reference in New Issue
Block a user