mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
reconnect rocketchat socket
This commit is contained in:
@@ -18,12 +18,23 @@ export class RochetChatConnectorService {
|
||||
constructor(private backgroundservice: BackgroundService,) {
|
||||
}
|
||||
|
||||
reConnect() {
|
||||
console.log('Connect1 ',this.ws.connected)
|
||||
if(!this.ws.connected) {
|
||||
this.ws.connect()
|
||||
console.log('Connect2 ',this.ws.connected)
|
||||
}
|
||||
}
|
||||
|
||||
connect() {
|
||||
console.log('Check conetion 11')
|
||||
// dont connect if is already connected
|
||||
if(this.ws.connected == true) {
|
||||
console.log('Check conetion 22')
|
||||
return false
|
||||
}
|
||||
|
||||
console.log('Check conetion 33')
|
||||
this.ws.connect();
|
||||
|
||||
const message = {
|
||||
|
||||
Reference in New Issue
Block a user