Browse Source

Resolve message decode nil pointer error

master
Trevor Slocum 6 years ago
parent
commit
80a5f88b0f
  1. 3
      server.go

3
server.go

@ -434,8 +434,7 @@ func (s *Server) handleRead(c *Client) {
}
msg, err := c.reader.Decode()
if err != nil {
log.Println("Unable to read from client:", err)
if msg == nil || err != nil {
c.conn.Close()
s.partAllChannels(c.identifier)
return

Loading…
Cancel
Save