akoprow / cofoda

1 stars 0 forks source link

Issues with user data refresh. #36

Closed akoprow closed 3 years ago

akoprow commented 3 years ago

Reported by @lukaszkucinski, I wasn't able to reproduce.

WhatsApp Image 2020-11-08 at 17 31 26

The most likely scenario is that:

  1. Client thinks there's no user data and asks backend for a refresh.
  2. Backend sends data to client.
  3. Backend receives the query to refresh but sees that there's nothing to update.
  4. Client waits for the backend reply that will never come, hence continuously displaying 'Loading'.

If that indeed is the case then the easiest solution would be to always update meta.timesUpdated on the backend, even if no real update takes place. Alternatively to alleviate the issue we could delay the initial refresh on the client by a couple seconds, though that's not ideal as would delay the initial update for all new clients.

akoprow commented 3 years ago

Hopefully should be fixed in 36beea90b7077beb21d7b96bf5215d2c78eb8094.

lukaszkucinski commented 3 years ago

Thanks. Seems to be working. If anything changes I will let you know.