ipc: prevent ipc reconnect notification on 1st connect
This commit is contained in:
parent
b788d81146
commit
81af47ea9b
1 changed files with 3 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ class Ipc extends EventEmitter {
|
|||
|
||||
this.queue = []
|
||||
|
||||
this.disconnectedOnce = false
|
||||
this.reconnect = undefined
|
||||
|
||||
this.hearbeat = undefined
|
||||
|
|
@ -66,7 +67,7 @@ class Ipc extends EventEmitter {
|
|||
}, hearbeatTimeout)
|
||||
}, hearbeatInterval)
|
||||
|
||||
if (notifications) notifications.add({
|
||||
if (notifications && this.disconnectedOnce) notifications.add({
|
||||
icon: 'wifi',
|
||||
message: locales('server_connected'),
|
||||
id: 'ipc_state'
|
||||
|
|
@ -101,6 +102,7 @@ class Ipc extends EventEmitter {
|
|||
id: 'ipc_state',
|
||||
duration: Infinity
|
||||
})
|
||||
this.disconnectedOnce = true
|
||||
if (!this.reconnect) {
|
||||
this.reconnect = setInterval(()=>{
|
||||
this.open()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue