road86 / bahis-desk

Desktop application for BAHIS2
GNU General Public License v3.0
2 stars 1 forks source link

Not possible to synchronise after a failed synchronisation attempt #53

Closed mixmixmix closed 1 year ago

mixmixmix commented 1 year ago

Scenario:

  1. Server is down
  2. user tries to synchronise
  3. button is pressed and not functional until synchronisation completes
  4. Synchronisation times out (or fails, I think some of the requests get "connection refused"), button remains pressed, the toast still says that synchronisation is ongoing and will stay this way forever.
  5. Server goes back online
  6. User cannot synchronise until restarting the app (adding new data doesn't "unstuck" it either, button changes colour but remains pressed.

This was previously hacked by this commit https://github.com/road86/bahis-desk/commit/7f1cd1e3693a4913469df04f769339af67da5d3b which I think some of our recent work reverted

It is important that button is disabled for a bit of time after it is pressed as in the past users were able to flood the server by impatiently clicking the button multiple times.