Skip to content

Conversation

@karstenda
Copy link
Contributor

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e45d664965

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 719 to +721
// Remove local room state so client does not auto-retry unless requested
this.cleanupRoom(msg.roomId, msg.crdt);
this.emitRoomStatus(roomId, RoomJoinStatus.Error);
this.cleanupRoom(msg.roomId, msg.crdt);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Emit error before cleanup can block immediate rejoin

If an onStatusChange callback attempts to rejoin the room synchronously on RoomJoinStatus.Error, this new ordering emits the status while the room is still registered. join() short-circuits when it sees an active room (activeRooms.get(id) returns truthy), so the callback will get the stale room and no rejoin is issued, even though cleanupRoom runs immediately afterward. This only occurs when clients trigger a rejoin in the status callback, but it makes the documented “caller can rejoin manually” path unreliable. Consider cleaning up before emitting or temporarily allowing join to bypass the existing room in this error path.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant