gmallard/stompngo — pull request #18 by danieltmiles (2014-09-19 19:57:40+00:00)
Title: adding locking and closed-checking to make sure that we do not write to ...

...closed channels

Thank you for all your work on this stompngo library, we've been putting it through its paces. In the course of doing that, we've discovered that sometimes when we Disconnect() a stompngo Connection object, we get a panic, as it has a goroutine trying to write to the c.input channel that's just been closed in the Disconnect() method.

I believe this patch should address that race condition.