mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
merge with branchBug
This commit is contained in:
@@ -85,21 +85,17 @@ class SynchroService {
|
||||
|
||||
|
||||
|
||||
//if(!this._connected) {
|
||||
|
||||
if(!this._connected === true) {
|
||||
this.BackgroundService.online()
|
||||
console.log('Online',this._connected)
|
||||
this.callBacks.forEach((e)=>{
|
||||
if(e.type == 'Online') {
|
||||
e.funx()
|
||||
}
|
||||
})
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
console.log('open ======================= welcome to socket server')
|
||||
this.eventtrigger.publishSomeData({
|
||||
internet: "online"
|
||||
})
|
||||
|
||||
this._connected = true
|
||||
|
||||
@@ -182,17 +178,18 @@ class SynchroService {
|
||||
// event.code is usually 1006 in this case
|
||||
console.log('[close] Connection died');
|
||||
console.log('Reconnect')
|
||||
|
||||
|
||||
|
||||
|
||||
// if(this._connected){
|
||||
if(this._connected === false){
|
||||
this.BackgroundService.offline();
|
||||
console.log('Offline',this._connected)
|
||||
this.callBacks.forEach((e)=>{
|
||||
if(e.type == 'Offline') {
|
||||
e.funx()
|
||||
}
|
||||
})
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
// status
|
||||
|
||||
Reference in New Issue
Block a user