Skip to content
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

Don't reconnect when WebSocket returns server error #2264

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

aleDsz
Copy link
Member

@aleDsz aleDsz commented Oct 9, 2023

In #1675 we added this sleeping time, but since then we didn't notice that until last week.

If the org credentials are invalid, the Liveboook.Teams.Connection gen state will send a server error message to Livebook.Hubs.TeamClient, which should send the message only time using the Livebook.Hubs.Broadcasts module.

Before this change, it was spamming like 5 times the message and it would keep showing in the frontend. But now it only shows one time and closes the gen server before it sends again.

@aleDsz aleDsz self-assigned this Oct 9, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Uffizzi Preview deployment-38062 was deleted.

lib/livebook/hubs.ex Outdated Show resolved Hide resolved
lib/livebook/hubs.ex Outdated Show resolved Hide resolved
lib/livebook/hubs.ex Outdated Show resolved Hide resolved
@aleDsz aleDsz changed the title Reduce the task sleeping time before disconnecting the hub Don't reconnect when web socket returns server error Oct 10, 2023
@aleDsz aleDsz changed the title Don't reconnect when web socket returns server error Don't reconnect when WebSocket returns server error Oct 10, 2023
@aleDsz aleDsz merged commit 2898ee3 into livebook-dev:main Oct 10, 2023
6 checks passed
@aleDsz aleDsz deleted the ale-fix-hub-error-message branch October 10, 2023 21:51
@josevalim
Copy link
Contributor

After a discussion with @aleDsz, we concluded we need to have a notification system for delivering messages that are not caused by user actions.

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