|
@@ -55,7 +55,7 @@ func (*handler) OnMessage(c *gn.Conn, bytes []byte) { |
|
|
|
|
|
|
|
|
func (*handler) OnClose(c *gn.Conn, err error) { |
|
|
func (*handler) OnClose(c *gn.Conn, err error) { |
|
|
conn, ok := c.GetData().(*Conn) |
|
|
conn, ok := c.GetData().(*Conn) |
|
|
if !ok { |
|
|
|
|
|
|
|
|
if !ok || conn == nil { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
logger.Logger.Debug("close", zap.String("addr", c.GetAddr()), zap.Int64("user_id", conn.UserId), |
|
|
logger.Logger.Debug("close", zap.String("addr", c.GetAddr()), zap.Int64("user_id", conn.UserId), |
|
|