Skip to content

Conversation

@kezz
Copy link
Member

@kezz kezz commented Jul 24, 2023

Quite simple, just recreate the websocket and reinitialize it whenever it closes. Unsure if this will have any janky side-effects, but seems to work okay.

Closes #165.

@rymiel
Copy link
Contributor

rymiel commented Jul 24, 2023

Shouldn't this need some sort of delay or debounce? Wouldn't it start spamming requests?

Comment on lines -501 to -502
val warning = document.element<HTMLTextAreaElement>("connection-lost-warning")
val inputBox = document.element<HTMLTextAreaElement>("input")
Copy link
Member Author

Choose a reason for hiding this comment

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

Should remove the HTML for this too

Copy link
Member

Choose a reason for hiding this comment

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

This still makes sense to have in cases where, for example the user has lost internet connection altogether, where there should be some evidence that the reconnection is being attempted

@MiniDigger
Copy link
Member

I agree with rymiel, a set timeout or even better, exceptional backoff

@MiniDigger
Copy link
Member

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for websockets to reconnect

5 participants