thoj/go-ircevent — pull request #33 by lucron (2014-06-21 15:30:02+00:00)
Title: Fix for reconnect and connection errors

Hey there,

if an IRC connection is closed by the server (e.g. kill, ping timeout), the bot will panic, because Disconnect() is called twice, from the ERROR callback as well as from Loop():

```
panic: runtime error: close of closed channel
```

Futhermore ```irc.end``` is still closed on the reconnect attempt. As a result, the go routines will quit themselves immediately.