Portenta H7 OSError: Errno 103 when trying to connect to Flask

I have a flask app running on local machine. I’ve set the app.run to “” and ensured I’m on the same network as the Portenta.

However, when i try to connect via the Portenta, after awhile it returns this error
OSError: [Errno 103] ECONNABORTED with error returning to line 105 in request and 175 (post)


I am able to ping the server using postman (but then again it’s on the same machine)
The portenta is able to connect to another webservice and make the call but fails on this flask. Does anyone know what might be the likely cause?

You should probably try to handle the error and then reconnect. Since our sockets are very low level you basically see any error happening and you have to handle it in your application.