only quit registered clients

This commit is contained in:
Jeremy Latt
2014-02-13 20:52:42 -08:00
parent dcc40bbac1
commit be01a412d9
2 changed files with 11 additions and 8 deletions
+6 -1
View File
@@ -113,7 +113,12 @@ func (c *Client) readCommands() {
m.SetClient(c)
c.server.Command(m)
}
c.ConnectionClosed()
if c.registered {
c.ConnectionClosed()
} else {
c.Destroy()
}
}
func (client *Client) writeReplies() {