diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index ded830c43..9fd71d989 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -393,6 +393,7 @@ func (c *Client) writePingMsg() error { func (c *Client) writePongMsg(appData string) error { log.ZDebug(c.ctx, "write Pong Msg in Server", "appData", appData) if c.closed.Load() { + log.ZWarn(c.ctx, "is closed in server", nil, "appdata", appData, "closed err", c.closedErr) return nil } @@ -403,6 +404,7 @@ func (c *Client) writePongMsg(appData string) error { log.ZDebug(c.ctx, "write Pong Msg in Server", "appData", appData) err := c.conn.SetWriteDeadline(writeWait) if err != nil { + log.ZWarn(c.ctx, "SetWriteDeadline in Server have error", errs.Wrap(err), "writeWait", writeWait, "appData", appData) return errs.Wrap(err) } err = c.conn.WriteMessage(PongMessage, []byte(appData)) @@ -410,5 +412,6 @@ func (c *Client) writePongMsg(appData string) error { log.ZWarn(c.ctx, "Write Message have error", errs.Wrap(err), "Pong msg", PongMessage) } + log.ZDebug(c.ctx, "write message is success", "appdata", appData, "closed err", c.closedErr) return errs.Wrap(err) }