Disable keepalive if we disconnect the socket
This commit is contained in:
parent
9e9d767a30
commit
78956ede2f
2 changed files with 2 additions and 0 deletions
|
@ -38501,6 +38501,7 @@ axolotlInternal.RecipientRecord = function() {
|
||||||
if (this.disconnect) {
|
if (this.disconnect) {
|
||||||
// automatically disconnect if server doesn't ack
|
// automatically disconnect if server doesn't ack
|
||||||
this.disconnectTimer = setTimeout(function() {
|
this.disconnectTimer = setTimeout(function() {
|
||||||
|
clearTimeout(this.keepAliveTimer);
|
||||||
this.wsr.close(3001, 'No response to keepalive request');
|
this.wsr.close(3001, 'No response to keepalive request');
|
||||||
}.bind(this), 1000);
|
}.bind(this), 1000);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -185,6 +185,7 @@
|
||||||
if (this.disconnect) {
|
if (this.disconnect) {
|
||||||
// automatically disconnect if server doesn't ack
|
// automatically disconnect if server doesn't ack
|
||||||
this.disconnectTimer = setTimeout(function() {
|
this.disconnectTimer = setTimeout(function() {
|
||||||
|
clearTimeout(this.keepAliveTimer);
|
||||||
this.wsr.close(3001, 'No response to keepalive request');
|
this.wsr.close(3001, 'No response to keepalive request');
|
||||||
}.bind(this), 1000);
|
}.bind(this), 1000);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue