urequests and timeout?
when loosing the wlan-connection (e.g. i turn of the router) my programm hangs at :
response = urequests.post(db, data=payload,timeout=timeout_sec)
It is not raising a exception, the program hangs for ever at this line.
Any idea why?
How do you implement a simple post-command with a timeout option?
Andreas is right Martin. I had to resort to a wdt to get around urequest hangs. I tried adding a timeout to urequests, putting urequests in a different thread & setting interrupt timers, nothing worked. Try import urequests; response=urequests.post(your_url, data=payload)
maybe @kjm has something to say about timeouts with the
urequestsmodule. Within , it looks like he worked around it using the watchdog timer.
With kind regards,