Skip to content

Fix: Resolve WebSocket connection error when deleting chat history #2017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

hexart
Copy link
Contributor

@hexart hexart commented Mar 18, 2025

Issue

When deleting a chat history session from the sidebar, a WebSocket error occurs:
"WebSocket is closed before the connection is established."

Solution

Added a short delay (300ms) after clearing the current session before proceeding with the delete operation. This gives the WebSocket enough time to properly reconnect before continuing with the session deletion process.

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working frontend Pertains to the frontend. labels Mar 18, 2025
Copy link
Collaborator

@willydouhard willydouhard left a comment

Choose a reason for hiding this comment

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

lgtm

@willydouhard willydouhard added this pull request to the merge queue Mar 18, 2025
Merged via the queue into Chainlit:main with commit b2e49fe Mar 18, 2025
8 checks passed
@hexart hexart deleted the fix-websocket-disconnect-issue branch March 18, 2025 21:16
notlaedri pushed a commit to notlaedri/chainlit that referenced this pull request May 5, 2025
hazemHany09 pushed a commit to InfomineoGithub/chainlit that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Pertains to the frontend. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants