You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frontend: don't stop polling after an error (regression) (#140)
commit 953537f ("Replace jquery w/ axios") / PR #126, which was
supposed to be a straightforward port of existing functionality from one
library to another, moved the logic that queues a new game state request
from a jQuery `.complete()` callback, which runs regardless of whether
the request succeeded or not, to a React `.setState()` completion
callback, which only runs if the request succeeded (since that's the
only case where `setState()` is called).
This appears to have been unintentional, and it has the effect of
stopping state updates altogether after a single one fails, with the
only recourse being to refresh the page. This is clearly a bad user
experience, and me and my friends have personally experienced it
frequently in every game we've played for the last few weeks.
Fix the problem by moving the logic into a `.finally()` callback, which
will execute regardless of whether the request succeeded or failed.
0 commit comments