fix: [Experimental hotfix 1] Fix Signaling issues Toju App
1. Server: WebSocket ping/pong heartbeat (index.ts) Added a 30-second ping interval that pings all connected clients Connections without a pong response for 45 seconds are terminated and cleaned up Extracted removeDeadConnection() to deduplicate the cleanup logic between close events and dead connection reaping 2. Server: Fixed sendServerUsers filter bug (handler.ts:13) Removed && cu.displayName from the filter — users who joined a server before their identify message was processed were silently invisible to everyone. This was the direct cause of "can't see each other" in session 2. 3. Client: Typing message now includes serverId Added serverId: this.webrtc.currentServerId to the typing payload Added a currentServerId getter on WebRTCService
This commit is contained in:
@@ -513,6 +513,11 @@ export class WebRTCService implements OnDestroy {
|
||||
this.activeServerId = serverId;
|
||||
}
|
||||
|
||||
/** The server ID currently being viewed / active, or `null`. */
|
||||
get currentServerId(): string | null {
|
||||
return this.activeServerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an identify message to the signaling server.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user