ipc: prevent stuck disconnected notif
This commit is contained in:
parent
5184498b9a
commit
5f4c2c60be
1 changed files with 3 additions and 2 deletions
|
|
@ -123,16 +123,17 @@ class Ipc extends EventEmitter {
|
|||
clearTimeout(this.disconnectTimeout)
|
||||
this.disconnectTimeout = setTimeout(()=>{
|
||||
// delay notification in case reconnection succeeds quickly
|
||||
if (notifications && this.disconnected) notifications.add({
|
||||
if (notifications && !this.connected()) notifications.add({
|
||||
icon: 'wifi',
|
||||
class: 'error',
|
||||
message: locales('server_disconnected'),
|
||||
id: 'ipc_state',
|
||||
duration: Infinity
|
||||
})
|
||||
this.disconnected = true
|
||||
|
||||
}, reconnectTimeout * 2)
|
||||
|
||||
this.disconnected = true
|
||||
|
||||
clearTimeout(this.reconnectTimeout)
|
||||
this.reconnectTimeout = setTimeout(()=>{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue