cleanup, welcome with proper server time
This commit is contained in:
+8
-3
@@ -31,10 +31,15 @@ export class WssConnexion {
|
||||
}
|
||||
|
||||
welcome(){
|
||||
clearTimeout(this.challengeTimeout)
|
||||
this.challengeTimeout = null
|
||||
// clearTimeout(this.challengeTimeout)
|
||||
// this.challengeTimeout = null
|
||||
this.cnxState = 'CONNECTED'
|
||||
if(this.debug) console.log(`Welcome to UUID ${this.uuid}`)
|
||||
this.send(JSON.stringify({
|
||||
'action': 'WELCOME',
|
||||
'cnxId': this.uuid,
|
||||
'serverTime': Date.now(),
|
||||
}));
|
||||
if(this.debug) console.log(`Welcome to UUID ${this.uuid}, server time: ${performance.now()}`)
|
||||
}
|
||||
|
||||
startKeepAlive() {
|
||||
|
||||
Reference in New Issue
Block a user