ecdavis / pants

A lightweight framework for writing asynchronous network applications in Python.
http://pantspowered.org/
Apache License 2.0
167 stars 9 forks source link

How do we listen for HANGUP events when using select()? #38

Closed ecdavis closed 12 years ago

ecdavis commented 12 years ago

Investigate. If we do, document how it works. If we don't make it so we do and then document that.

ecdavis commented 12 years ago

The answer is that we don't. There's obviously no way to get hangup events using select() and checking the socket error doesn't really give us a decent way of knowing whether it was a real hangup or not. I'm not sure if there's really any solution to this problem, so people using select() will have to put up with overriding _Channel._handle_error_event() to gracefully hangle lost connections if they find that they're having problems. Testing hasn't revealed any issues with select() so far, though, so that's a good thing.