cleanup, welcome with proper server time

This commit is contained in:
STEINNI
2026-06-26 21:51:43 +00:00
parent a868caf8c9
commit b551f473b4
3 changed files with 17 additions and 9 deletions
+3 -1
View File
@@ -29,6 +29,7 @@ export class wssServer {
}
newWSSConnexion(socket, req) {
console.log('newWSSConnexion')
var uuid = crypto.randomUUID();
if(socket.session && socket.session.authenticated && socket.session.userInfos && socket.session.userInfos.identity && socket.session.userInfos.identity.username){
var wssCnx = new WssConnexion({
@@ -48,12 +49,13 @@ export class wssServer {
this.Users2uuids[wssCnx.userId].add(uuid);
this.OnlineUsers.add(wssCnx.userId);
this.allRediscnx.forEach(cnx => { cnx.wssConnections[uuid] = wssCnx })
this.postLoginActions(wssCnx)
setImmediate(() => this.postLoginActions(wssCnx))
} else socket.close()
}
postLoginActions(wssCnx) {
wssCnx.welcome()
wssCnx.startKeepAlive()
wssCnx.subscribeMandatoryChans()
wssCnx.action_SUBLST('SUBLST', null, '')