Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 8917fb8

Browse files
committed
Patch heartbeat ping logic
1 parent f6bc6da commit 8917fb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/cmd/shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func heartbeat(ctx context.Context, conn *websocket.Conn, interval time.Duration
216216
case <-ctx.Done():
217217
return
218218
case <-ticker.C:
219-
if err := conn.Ping(ctx); err != nil || true {
219+
if err := conn.Ping(ctx); err != nil {
220220
// don't try to do multi-line here because the raw mode makes things weird
221221
clog.Log(clog.Fatal("failed to ping websocket, exiting: " + err.Error()))
222222
os.Exit(1)

0 commit comments

Comments
 (0)