tinode / ios

Tinodios: Tinode Messaging Client for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App freezes in launchscreen

aforge opened this issue · comments

Sometimes the app freezes and hangs in the launchscreen after sending a {hi} request to the server and not receiving a response (when we have an auth token saved on the device).
Implement future timeouts to prevent such problems from happening.

commented

I suppose this should be done in Android as well.

commented

And webapp

Nice. Do you want to run it once a second?
I think something like 10 seconds should do.

Added similar logic in iOS: 83fbad0

commented

Nice. Do you want to run it once a second?

I don't think it matters much. When the queue is empty it exits very quickly. 10 sec is an overkill though. It means some promises won't be expired for 15 seconds.

Ideally it should not run at all if the queue is empty. I.e. if the queue is empty, stop the timer, restart it when something is added to queue.

Right. My main concern here is the battery.
Anyway, I've reduced the iOS interval down to 3 seconds. Closing this bug.