adhearsion/blather — pull request #143 by emschwar (2014-08-18 21:47:34+00:00)
Title: Shutdown workqueue on close

Part 2 of 2 to help address https://github.com/adhearsion/blather/issues/139

Depends on https://github.com/adhearsion/blather/pull/140 (for lazy initialization of `handler_queue`)

Since the `handler_queue` is lazily initialized, all we have to do at connection close time is shutdown the queue and nil it out. Any subsequent reference (such as in `#receive_data`) will automatically re-create it, if necessary.