[优化] 修复增强

This commit is contained in:
ryan
2026-06-02 17:24:12 +08:00
parent 4e33e0e521
commit c009b9e283
2 changed files with 3 additions and 0 deletions
@@ -95,6 +95,7 @@ func (conn *Connection) SendPing() error {
return errors.New("relay ws connection is nil")
}
slog.Debug("relay ws sending ping")
_ = conn.conn.SetWriteDeadline(time.Now().Add(5 * time.Second))
return websocket.JSON.Send(conn.conn, service.WSMessage{
Type: "ping",
})
@@ -105,6 +106,7 @@ func (conn *Connection) SendPong() error {
return errors.New("relay ws connection is nil")
}
slog.Debug("relay ws sending pong")
_ = conn.conn.SetWriteDeadline(time.Now().Add(5 * time.Second))
return websocket.JSON.Send(conn.conn, service.WSMessage{
Type: "pong",
})
+1
View File
@@ -95,6 +95,7 @@ func (conn *Connection) SendPong() error {
return errors.New("flared ws connection is nil")
}
slog.Debug("flared ws sending pong")
_ = conn.conn.SetWriteDeadline(time.Now().Add(5 * time.Second))
return websocket.JSON.Send(conn.conn, service.WSMessage{
Type: "pong",
})