diff --git a/irc/client.go b/irc/client.go index 7d9cecef..2ab2953a 100644 --- a/irc/client.go +++ b/irc/client.go @@ -84,7 +84,9 @@ func (c *Client) Quit() { } close(c.quit) c.lock.Lock() - c.conn.Close() + if c.conn != nil { + c.conn.Close() + } c.lock.Unlock() }() }