KyoriPowered / adventure-webui

A web UI for Adventure
https://webui.advntr.dev/
MIT License
25 stars 16 forks source link

feature: Automatically reconnect the websocket connection on close #169

Open kezz opened 1 year ago

kezz commented 1 year ago

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 commented 1 year ago

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

MiniDigger commented 1 year ago

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

MiniDigger commented 1 year ago

can use https://www.npmjs.com/package/exponential-backoff