softprops / hyperlocal

🔌 ✨rustlang hyper bindings for local unix domain sockets
MIT License
227 stars 46 forks source link

Disable keep-alive on server example #68

Closed iamjpotts closed 3 months ago

iamjpotts commented 3 months ago

Based on a suggestion by @fussybeaver at https://github.com/softprops/hyperlocal/issues/66#issuecomment-2041543035, disables keep alive in the server example.

This results in consistent behavior of the server example between Linux and OSX - serve_connection returns Ok immediately after a client connects, rather than on OSX blocking while the client is connected, and then returning an Err later when the client gracefully disconnects.