@@ -7,9 +7,8 @@ import type {
77
88interface ActorsConfig {
99 appId : string ;
10- /** Current user access token, if authenticated. Rides the WS query (same
11- * pattern as the entities socket) so the platform proxy can authenticate the
12- * connection like a backend-function call; anonymous connects omit it. */
10+ /** Current user access token, if authenticated. Rides the WS query so the
11+ * platform proxy can authenticate the connection; anonymous connects omit it. */
1312 getAuthToken ( ) : string | null | undefined ;
1413 /** Same semantics as function calls: editors with a non-prod version get the
1514 * draft actor script; everyone else gets the published one. */
@@ -19,10 +18,8 @@ interface ActorsConfig {
1918 webSocketImpl ?: unknown ;
2019}
2120
22- // Heartbeat / half-open detection. PartySocket only reconnects on a browser
23- // close/error event, so a silently-dead connection (TCP alive, no data — common
24- // behind proxies/LBs) hangs until the OS idle timeout (~60s). Ping periodically
25- // and force a reconnect if nothing comes back within DEAD_MS.
21+ // Heartbeat / half-open detection: PartySocket only reconnects on a close/error
22+ // event, so ping periodically and force a reconnect if nothing returns in DEAD_MS.
2623const PING_MS = 1_000 ;
2724const DEAD_MS = 3_000 ;
2825
@@ -58,9 +55,7 @@ class Room {
5855 room : this . instanceId ,
5956 id : connId ,
6057 ...( this . config . webSocketImpl ? { WebSocket : this . config . webSocketImpl as any } : { } ) ,
61- // Re-read on every (re)connect so a login/logout between reconnects is
62- // picked up. The platform proxy authenticates the connection itself —
63- // no pre-connect token mint.
58+ // Re-read on every (re)connect so a login/logout is picked up.
6459 query : ( ) => {
6560 const token = this . config . getAuthToken ( ) ;
6661 return {
0 commit comments