Skip to content

Commit 6a475c0

Browse files
committed
Update.
1 parent b1f6dd8 commit 6a475c0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ debug_monitor.sh
2929
sqlite.db
3030
config
3131
heap.txt
32+
gp.txt

cmd/dashboard/controller/common_page.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ func (cp *commonPage) ws(c *gin.Context) {
12861286

12871287
// 处理客户端自定义的ping消息
12881288
if msgType == websocket.TextMessage && string(message) == `{"type":"ping"}` {
1289+
conn.SetReadDeadline(time.Now().Add(60 * time.Second))
12891290
conn.SetWriteDeadline(time.Now().Add(10 * time.Second))
12901291
if err := safeConn.WriteMessage(websocket.TextMessage, []byte(`{"type":"pong"}`)); err != nil {
12911292
log.Printf("发送pong失败 %s: %v", connID, err)

0 commit comments

Comments
 (0)