* leave room * 1. Remove long chain message monitoring * 2. Clear data sending status monitoring timer
()
| 405 | * 2. Clear data sending status monitoring timer |
| 406 | */ |
| 407 | async leaveRoom() { |
| 408 | this.setConnected(false); |
| 409 | /** |
| 410 | * After switching the space, the socket of the previous space is closed, so the event of leave_room will not be triggered, so |
| 411 | * You can check the connection status of the item socket here |
| 412 | */ |
| 413 | if (this.socket.connected) { |
| 414 | await this.unwatch(); |
| 415 | } else { |
| 416 | console.log("socket has been closed, room needn't leave again"); |
| 417 | } |
| 418 | this.clearSendingWatcher(); |
| 419 | return this.collaEngineMap; |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * @description supports a single Resource to exit the current collaborative Room without destroying the current Room |
nothing calls this directly
no test coverage detected