Skip to content

Fix reconnecting a websocket with the same client id. - #16243

Open
comfyanonymous wants to merge 1 commit into
masterfrom
ws_fix
Open

Fix reconnecting a websocket with the same client id.#16243
comfyanonymous wants to merge 1 commit into
masterfrom
ws_fix

Conversation

@comfyanonymous

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 966991b2-de5b-4867-860b-2abd72610ba7

📥 Commits

Reviewing files that changed from the base of the PR and between 6338e4b and 2e9df13.

📒 Files selected for processing (1)
  • server.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (8)
  • GitHub Check: Run Pylint
  • GitHub Check: test (windows-latest)
  • GitHub Check: test (macos-latest)
  • GitHub Check: test (ubuntu-latest)
  • GitHub Check: test (macos-latest)
  • GitHub Check: test (windows-2022)
  • GitHub Check: test (ubuntu-latest)
  • GitHub Check: Run Pylint
🧰 Additional context used
📓 Path-based instructions (2)
IMPORTANT: Only comment on issues directly introduced by this PR's code changes.

⚙️ CodeRabbit configuration file

Files:

  • server.py
Documentation and README edits should be concise, factual, and tied to the changed behavior.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • server.py

📝 Walkthrough

Walkthrough

PromptServer now generates a UUID when a WebSocket client does not provide clientId. It stores the new socket and closes the previous socket for the same identifier. The message loop exits when its socket is no longer active. Cleanup removes socket data only when the current socket still owns the identifier.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2e9df

WebSocket reconnections with the same client ID retain the new connection without allowing stale connections to remove its state. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided, so the changeset has no author-provided explanation beyond the title. Add a brief description that explains the WebSocket reconnection fix and the key behavior changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fixing WebSocket reconnections that use the same client ID.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI

Comment @coderabbitai help to get the list of available commands.

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.

3 participants