oxan / esphome-stream-server

Stream server (serial-to-wifi bridge) for ESPHome
Other
200 stars 85 forks source link

Update stream_server.cpp #42

Closed rayomvox closed 1 year ago

rayomvox commented 1 year ago

Handles when a socket doesn't go away cleanly in a read or a write which would otherwise cause:

[W][stream_server:168]: Failed to read from client 192.168.199.1 with error 128! [W][stream_server:168]: Failed to read from client 192.168.199.1 with error 128! [E][stream_server:145]: Failed to write to client 192.168.199.1 with error 128! [E][stream_server:145]: Failed to write to client 192.168.199.1 with error 128!

This would just go on forever because it thinks the client is still there so it tries to read/write to it.

rayomvox commented 1 year ago

Wrong errno. Will fix