-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Description
My router changes his ip every three days, and then this sdk does not reconnect to the server.
This request method does not return in that case, and so there is also no exception which could be handled.
Solution: add a timeout to the request.
I can do a pull request, but there are some points to discuss:
- The timeout has to be larger than the timeout defined in the query_params. (if available). Should we use 60 seconds by default (if no timeout is available), otherwise 2*query_params['timeout'] (
request_timeout = 2 * query_params.get('timeout', 60000)/1000
) - Should we handle the possible timeout exception in listen_forever by default?
Moreover I have to search whether there are more requests in this code, and whether it is useful to add a timeout.