Description
In #184 I wrote:
We should also ensure that if the request doesn't come back within an appropriate timeout, then we treat it as having failed and retry. The Zulip server should always respond to a long-poll within at most about 60 seconds, with a heartbeat event if there's no information to convey. So if it's been much longer than that and we haven't gotten a response, then we should assume none is coming — the request or response must have been lost somewhere. (This part might get split out as a separate issue.)
This is something we don't do in zulip-mobile, so leaving it for post-launch before we spend time pinning down the right behavior here.
One piece of context is that the underlying HTTP client library (the HttpClient
of dart:io
, which underlies package:http
) already has a timeout for idle connections (with a default of 15 seconds), and presumes the OS has a timeout for making new connections. So as long as that OS-level timeout has an appropriate value, adding an overall timeout may only really change things if we've successfully made a connection and are more or less continuously getting data on it, just very slowly… and in that case the reasoning above for a timeout doesn't really apply and it seems likely best to just have patience.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status