Trigger empty event on keepalive timeout (#1466)

This commit is contained in:
Lilia 2017-09-13 20:25:51 +02:00 committed by Scott Nonnenberg
parent 420cfc46be
commit c832324cb9
No known key found for this signature in database
GPG Key ID: A4931C09644C654B
2 changed files with 6 additions and 0 deletions

View File

@ -38393,6 +38393,9 @@ MessageReceiver.prototype.extend({
if (ev.code === 3000) {
return;
}
if (ev.code === 3001) {
this.onEmpty();
}
// possible 403 or network issue. Make an request to confirm
return this.server.getDevices(this.number)
.then(this.connect.bind(this)) // No HTTP error? Reconnect

View File

@ -57,6 +57,9 @@ MessageReceiver.prototype.extend({
if (ev.code === 3000) {
return;
}
if (ev.code === 3001) {
this.onEmpty();
}
// possible 403 or network issue. Make an request to confirm
return this.server.getDevices(this.number)
.then(this.connect.bind(this)) // No HTTP error? Reconnect