Closed FrancisG-Massey closed 7 years ago
Which one is hanging on non-responses from the server?
None are. Just implementing this in case someone's using the app via some dumb proxy server (or other system) which isn't responding for some reason, so they don't end up with an infinite loading screen.
Just go with your best judgement then.
The app needs some timeouts, so it doesn't wait forever for API requests which never complete (due to some sort of network error). What would be the best values for these timeout?
Note: There are two timeout values: connectTimeout - A timeout when trying to connect to the server readTimeout - A timeout when reading response data from the server