mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 03:13:15 +08:00 
			
		
		
		
	add Warn log in writePongMsg.
This commit is contained in:
		
							parent
							
								
									86e3e3861e
								
							
						
					
					
						commit
						8a8b99a8bd
					
				@ -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)
 | 
				
			||||||
		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))
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user