not-na / fritzctl

Object oriented TR64 FRITZ!Box Client Library
GNU General Public License v2.0
4 stars 1 forks source link

Expose timeout setting in Session. #3

Closed tobyp closed 4 years ago

tobyp commented 4 years ago

Sometimes, the 2 second default timeout of simpletr64 is not enough.

I'm not sure why; I've been doing nightly requests to my box for almost 3 months with no problems. For the last 5 days, timeouts have been occurring consistently. Specs: FRITZ!Box 7490, Firmware 07.12, Installed 2019-08-26. I'm not aware of any changes in the network or usage patterns. Experimentally, I've determined that 4 seconds generally works for me now now.

This PR adds a timeout keyword argument to Session.__init__, which is passed to simpletr64.DeviceTR64.execute. The change should be non-breaking, as nothing is changed if a timeout argument is already passed (but nothing in fritzctl does).