-
Notifications
You must be signed in to change notification settings - Fork 23
Accept frequently fails with [Errno 107] ENOTCONN #7
Description
I am running the v1.0.4 firmware.uf2 release with the HTTP_Server example from examples/HTTP/HTTP_Server/HTTP_Server.py
I use a Raspberry Pico connected to one of these small blue w5500 boards (https://www.az-delivery.de/products/w5500-ethernet-netzwerk-internet-modul-fuer-arduino). The W5500 reads WIZnet W5500 DQK581 2133 which seems to be quite new.
The whole setup is rather unreliable and see errors like this one:
Connect from ('192.168.1.1', 80)
HTTP_Server.py, line 55, in main
OSError: [Errno 107] ENOTCONN
This is in "accept". Sometimes also the recv or the send fail.
This doesn't always happens. Most of the time the reply is sent just fine. But occasionally errors like these happen. They happen more often the more traffic there is on the connection. On a dedicated direct connection to a PC this works better, on a network shared with many other devices it becomes quite unreliable.
Hitting the reload button on the clients browser fast breaks the connection pretty fast usually in one of the send commands:
Connect from ('192.168.1.1', 80)
HTTP_Server.py, line 70, in main
OSError: 7
I tried adding a bunch of try/except to recover. But that needs a few seconds to recover and isn't a satisfying solution.
What is the reason for these errors? How can I fix them?