urequests and timeout?
-
Hi everyone.
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?
THX
MartinI am using this urequests.py :
https://github.com/micropython/micropyt ... equests.py
-
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)
-
Dear @zmaier,
maybe @kjm has something to say about timeouts with the
urequests
module. Within [1], it looks like he worked around it using the watchdog timer.With kind regards,
Andreas.