majek / puka

Puka - the opinionated RabbitMQ client
https://github.com/majek/puka
Other
182 stars 34 forks source link

make on_write handle shutdown connections and an empty buffer #33

Closed schmir closed 11 years ago

schmir commented 11 years ago

Connection._shutdown sets the sd and send_buf attributes to None. on_write may be called after _shutdown was called. We return early now in on_write if send_buf is None or if it is empty.

see issue #23: https://github.com/majek/puka/issues/23