mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-31 08:29:33 +08:00 
			
		
		
		
	chore: add Warn log in writePongMsg. (#2452)
* update protocol in go mod. * add debug log in writePongMsg. * update log level. * add Warn log in writePongMsg. * add debug log.
This commit is contained in:
		
							parent
							
								
									220a01d7f8
								
							
						
					
					
						commit
						ef46abd193
					
				| @ -393,6 +393,7 @@ func (c *Client) writePingMsg() error { | |||||||
| func (c *Client) writePongMsg(appData string) error { | func (c *Client) writePongMsg(appData string) error { | ||||||
| 	log.ZDebug(c.ctx, "write Pong Msg in Server", "appData", appData) | 	log.ZDebug(c.ctx, "write Pong Msg in Server", "appData", appData) | ||||||
| 	if c.closed.Load() { | 	if c.closed.Load() { | ||||||
|  | 		log.ZWarn(c.ctx, "is closed in server", nil, "appdata", appData, "closed err", c.closedErr) | ||||||
| 		return nil | 		return nil | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| @ -403,6 +404,7 @@ func (c *Client) writePongMsg(appData string) error { | |||||||
| 	log.ZDebug(c.ctx, "write Pong Msg in Server", "appData", appData) | 	log.ZDebug(c.ctx, "write Pong Msg in Server", "appData", appData) | ||||||
| 	err := c.conn.SetWriteDeadline(writeWait) | 	err := c.conn.SetWriteDeadline(writeWait) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | 		log.ZWarn(c.ctx, "SetWriteDeadline in Server have error", errs.Wrap(err), "writeWait", writeWait, "appData", appData) | ||||||
| 		return errs.Wrap(err) | 		return errs.Wrap(err) | ||||||
| 	} | 	} | ||||||
| 	err = c.conn.WriteMessage(PongMessage, []byte(appData)) | 	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.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) | 	return errs.Wrap(err) | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user