Fix up websocket options handling

This commit is contained in:
lilia 2015-07-27 18:50:55 -07:00
parent 4c9d69094d
commit 98edd3939b
2 changed files with 8 additions and 2 deletions

View file

@ -38409,7 +38409,10 @@ axolotlInternal.RecipientRecord = function() {
TextSecureWebSocket = function (url, opts) {
'use strict';
opts = opts || {};
var reconnectTimeout = opts.reconnectTimeout || 1000;
var reconnectTimeout = 1000;
if (opts && opts.reconnectTimeout !== undefined) {
reconnectTimeout = opts.reconnectTimeout;
}
var reconnectSemaphore = 0;
var socket;
var calledClose = false;

View file

@ -25,7 +25,10 @@
TextSecureWebSocket = function (url, opts) {
'use strict';
opts = opts || {};
var reconnectTimeout = opts.reconnectTimeout || 1000;
var reconnectTimeout = 1000;
if (opts && opts.reconnectTimeout !== undefined) {
reconnectTimeout = opts.reconnectTimeout;
}
var reconnectSemaphore = 0;
var socket;
var calledClose = false;