Gabinete digital offline complete

This commit is contained in:
Eudes Inácio
2021-09-29 16:47:58 +01:00
parent b59070f35e
commit 0b42dba6ca
25 changed files with 1324 additions and 746 deletions
+7 -10
View File
@@ -83,21 +83,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
@@ -180,17 +176,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