thoj/go-ircevent — pull request #21 by darkliquid (2014-02-10 20:13:33+00:00)
Title: Deal with shutdowns more safely

I found that if I called Quit, sometimes the Disconnect would happen whilst a callback was in progress and a write end up being sent to the now closed channel, causing the app to panic.

This patch adds in two more channels to kill the read and write loops early so that the above scenario can't happen, which the disconnect now triggers before closing the channels.