@bloks/link-session-manager
Advanced tools
Comparing version 0.2.644 to 0.2.645
/** | ||
* proton-link-session-manager v0.2.644 | ||
* proton-link-session-manager v0.2.645 | ||
* https://github.com/greymass/proton-link-session-manager | ||
@@ -4,0 +4,0 @@ * |
/** | ||
* proton-link-session-manager v0.2.644 | ||
* proton-link-session-manager v0.2.645 | ||
* https://github.com/greymass/proton-link-session-manager | ||
@@ -117,17 +117,2 @@ * | ||
this.connectTimeout = undefined; | ||
this.listeners = { | ||
open: [ | ||
function (event) { | ||
if (_this.connectTimeout) { | ||
clearTimeout(_this.connectTimeout); | ||
_this.connectTimeout = undefined; | ||
} | ||
event.reconnects = ++_this.reconnects; | ||
event.attempts = _this.attempts; | ||
_this.attempts = 0; | ||
_this.reconnectWhenOnlineAgain = false; | ||
}, | ||
], | ||
close: [this.reconnect], | ||
}; | ||
this.opts = { | ||
@@ -163,2 +148,17 @@ // the time to wait before a successful connection | ||
} | ||
this.listeners = { | ||
open: [ | ||
function (event) { | ||
if (_this.connectTimeout) { | ||
clearTimeout(_this.connectTimeout); | ||
_this.connectTimeout = undefined; | ||
} | ||
event.reconnects = ++_this.reconnects; | ||
event.attempts = _this.attempts; | ||
_this.attempts = 0; | ||
_this.reconnectWhenOnlineAgain = false; | ||
}, | ||
], | ||
close: [function (event) { return _this.reconnect(event); }], | ||
}; | ||
if (this.opts.automaticOpen) { | ||
@@ -263,2 +263,3 @@ this.newWebSocket(this.url); | ||
this.clearPendingReconnectIfNeeded(); | ||
console.log(this); | ||
this.reconnect({ code: 0 }); | ||
@@ -265,0 +266,0 @@ } |
/** | ||
* proton-link-session-manager v0.2.644 | ||
* proton-link-session-manager v0.2.645 | ||
* https://github.com/greymass/proton-link-session-manager | ||
@@ -92,17 +92,2 @@ * | ||
this.connectTimeout = undefined; | ||
this.listeners = { | ||
open: [ | ||
(event) => { | ||
if (this.connectTimeout) { | ||
clearTimeout(this.connectTimeout); | ||
this.connectTimeout = undefined; | ||
} | ||
event.reconnects = ++this.reconnects; | ||
event.attempts = this.attempts; | ||
this.attempts = 0; | ||
this.reconnectWhenOnlineAgain = false; | ||
}, | ||
], | ||
close: [this.reconnect], | ||
}; | ||
this.opts = { | ||
@@ -138,2 +123,17 @@ // the time to wait before a successful connection | ||
} | ||
this.listeners = { | ||
open: [ | ||
(event) => { | ||
if (this.connectTimeout) { | ||
clearTimeout(this.connectTimeout); | ||
this.connectTimeout = undefined; | ||
} | ||
event.reconnects = ++this.reconnects; | ||
event.attempts = this.attempts; | ||
this.attempts = 0; | ||
this.reconnectWhenOnlineAgain = false; | ||
}, | ||
], | ||
close: [(event) => this.reconnect(event)], | ||
}; | ||
if (this.opts.automaticOpen) { | ||
@@ -209,2 +209,3 @@ this.newWebSocket(this.url); | ||
this.clearPendingReconnectIfNeeded(); | ||
console.log(this); | ||
this.reconnect({ code: 0 }); | ||
@@ -211,0 +212,0 @@ } |
{ | ||
"name": "@bloks/link-session-manager", | ||
"description": "Session management for signature providers when receiving requests using the Anchor Link protocol", | ||
"version": "0.2.644", | ||
"version": "0.2.645", | ||
"homepage": "https://github.com/greymass/proton-link-session-manager", | ||
@@ -6,0 +6,0 @@ "license": "BSD-3-Clause", |
@@ -18,17 +18,3 @@ import NetInfo, {NetInfoState, NetInfoSubscription} from '@react-native-community/netinfo' | ||
listeners = { | ||
open: [ | ||
(event) => { | ||
if (this.connectTimeout) { | ||
clearTimeout(this.connectTimeout) | ||
this.connectTimeout = undefined | ||
} | ||
event.reconnects = ++this.reconnects | ||
event.attempts = this.attempts | ||
this.attempts = 0 | ||
this.reconnectWhenOnlineAgain = false | ||
}, | ||
], | ||
close: [this.reconnect], | ||
} | ||
listeners | ||
@@ -87,2 +73,18 @@ opts: { | ||
this.listeners = { | ||
open: [ | ||
(event) => { | ||
if (this.connectTimeout) { | ||
clearTimeout(this.connectTimeout) | ||
this.connectTimeout = undefined | ||
} | ||
event.reconnects = ++this.reconnects | ||
event.attempts = this.attempts | ||
this.attempts = 0 | ||
this.reconnectWhenOnlineAgain = false | ||
}, | ||
], | ||
close: [(event) => this.reconnect(event)], | ||
} | ||
if (this.opts.automaticOpen) { | ||
@@ -176,2 +178,3 @@ this.newWebSocket(this.url) | ||
this.clearPendingReconnectIfNeeded() | ||
console.log(this) | ||
this.reconnect({code: 0}) | ||
@@ -178,0 +181,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
102293
1753