Don't auto-reconnect provisioning socket
// FREEBIE
This commit is contained in:
parent
15cd348bf2
commit
0d0bdbf998
3 changed files with 10 additions and 8 deletions
|
@ -38406,10 +38406,11 @@ axolotlInternal.RecipientRecord = function() {
|
|||
*
|
||||
*/
|
||||
|
||||
TextSecureWebSocket = function (url) {
|
||||
TextSecureWebSocket = function (url, opts) {
|
||||
'use strict';
|
||||
opts = opts || {};
|
||||
var reconnectTimeout = opts.reconnectTimeout || 1000;
|
||||
var reconnectSemaphore = 0;
|
||||
var reconnectTimeout = 1000;
|
||||
var socket;
|
||||
var calledClose = false;
|
||||
var socketWrapper = {
|
||||
|
@ -38422,7 +38423,7 @@ TextSecureWebSocket = function (url) {
|
|||
var error;
|
||||
|
||||
function onclose(e) {
|
||||
if (!error && !calledClose) {
|
||||
if (!error && !calledClose && reconnectTimeout) {
|
||||
reconnectSemaphore--;
|
||||
setTimeout(connect, reconnectTimeout);
|
||||
}
|
||||
|
@ -39266,7 +39267,7 @@ TextSecureServer = function () {
|
|||
|
||||
self.getTempWebsocket = function() {
|
||||
var url = URL_BASE.replace(/^http/g, 'ws') + URL_CALLS['temp_push'] + '/?';
|
||||
return TextSecureWebSocket(url);
|
||||
return TextSecureWebSocket(url, {reconnectTimeout: false});
|
||||
}
|
||||
|
||||
return self;
|
||||
|
|
|
@ -329,7 +329,7 @@ TextSecureServer = function () {
|
|||
|
||||
self.getTempWebsocket = function() {
|
||||
var url = URL_BASE.replace(/^http/g, 'ws') + URL_CALLS['temp_push'] + '/?';
|
||||
return TextSecureWebSocket(url);
|
||||
return TextSecureWebSocket(url, {reconnectTimeout: false});
|
||||
}
|
||||
|
||||
return self;
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
TextSecureWebSocket = function (url) {
|
||||
TextSecureWebSocket = function (url, opts) {
|
||||
'use strict';
|
||||
opts = opts || {};
|
||||
var reconnectTimeout = opts.reconnectTimeout || 1000;
|
||||
var reconnectSemaphore = 0;
|
||||
var reconnectTimeout = 1000;
|
||||
var socket;
|
||||
var calledClose = false;
|
||||
var socketWrapper = {
|
||||
|
@ -38,7 +39,7 @@ TextSecureWebSocket = function (url) {
|
|||
var error;
|
||||
|
||||
function onclose(e) {
|
||||
if (!error && !calledClose) {
|
||||
if (!error && !calledClose && reconnectTimeout) {
|
||||
reconnectSemaphore--;
|
||||
setTimeout(connect, reconnectTimeout);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue