This commit is contained in:
Peter Maquiran
2022-02-16 15:55:29 +01:00
15 changed files with 100 additions and 227 deletions
+4 -2
View File
@@ -277,6 +277,8 @@ export class WsChatService {
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
if(message.id == requestId ) { // same request send
resolve(message)
console.log(message);
return true
}
}})
@@ -659,7 +661,7 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
setTimeout(()=>{
this.ws.wsMsgQueue()
}, 10)
if(this.wsReconnect >= 1) {
for (const [key, value] of Object.entries(this.wsCallbacks)) {
if(value.type== 'reConnect') {
@@ -702,7 +704,7 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
} else {
let messageStr = JSON.stringify(message)
// console.log('messageStr', messageStr)
this.socket.send(messageStr)
}
return requestId