mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Adding reconnect events to socket.io.
This commit is contained in:
parent
68d64a87a1
commit
6d7b105cff
1 changed files with 10 additions and 1 deletions
|
@ -4146,6 +4146,15 @@
|
|||
this.apply_tipsy_titles();
|
||||
_.delay(_.bind(this.setup_socket_realtime_unread_counts, this), 60*1000);
|
||||
}, this));
|
||||
this.socket.on('reconnect_failed', _.bind(function() {
|
||||
console.log(["Socket.io reconnect failed"]);
|
||||
}, this));
|
||||
this.socket.on('reconnect', _.bind(function() {
|
||||
console.log(["Socket.io reconnected successfully!"]);
|
||||
}, this));
|
||||
this.socket.on('reconnecting', _.bind(function() {
|
||||
console.log(["Socket.io reconnecting..."]);
|
||||
}, this));
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -4203,7 +4212,7 @@
|
|||
self.force_feeds_refresh();
|
||||
}
|
||||
}, refresh_interval);
|
||||
this.flags.refresh_interval = refresh_interval / 1000;
|
||||
this.flags.refresh_interval = parseInt(refresh_interval / 1000, 10);
|
||||
if (!this.socket || !this.socket.socket.connected) {
|
||||
$('.NB-module-content-account-realtime').attr('title', 'Updating sites every ' + this.flags.refresh_interval + ' seconds...').addClass('NB-error');
|
||||
this.apply_tipsy_titles();
|
||||
|
|
Loading…
Add table
Reference in a new issue