Try this code. This should run perfectly fine.
Where did you get the urequests library from? You'll need to check the source code and search for that error code.
@johand After I've set IP for HTTP server
i've tried to read IP address of HTTP Server and that was the problem, it's keep returning me '0.0.0.0'. IP address was set properly to '192.168.4.10' but function returns '0.0.0.0'.
Thank you for your help.
@pigamonte I've managed to do it with 1.18.2.
And one more:
File "urequests.py", line 54, in request
OSError: [Errno 9] EBADF
which might be #define EBADF 9 /* Bad file number */
I have a gc.collect() after the upload, but no .close on the connection. Adding this now to see how things go.
No one has replied
@sameerchouksey do you know if the network is sending MAC commands to the device? If so there could be acknowledgements to send back, which would reduce the max available packet size.
Not sure if those ACKs have priority over the payload though.
@livius Thanks for your help, the gc.collect() has worked and the loop has remained stable for a few hours now.
@semireg We'll have a look to see if there's a bug in the socket implementation.
See my answer regarding oserror from tls in the post:
@RobTuDelft Try closing the socket after each request you make as @this-wiederkehr suggested here. It worked for me.
@this-wiederkehr You've got the point. I've tried this and finally, it works without any error. Thanks a lot.