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

Change the point at which on_close() is called #33

Closed ecdavis closed 12 years ago

ecdavis commented 12 years ago

Currently, _Channel.on_close() is called after the channel has been completely cleaned up. This means that it's impossible to access any channel-specific state (buffered data, addresses, filenos, etc.) in on_close() callbacks.

Consider altering the code to call on_close() before cleanup starts.

ecdavis commented 12 years ago

Done. _Channel subclasses are now responsible for calling on_close()