Skip to content

Commit afca45e

Browse files
committed
Consume websocket pings for stderr
Fixes: #1289
1 parent 795717f commit afca45e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmd/incusd/instance_exec.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,13 @@ func (s *execWs) Do(op *operations.Operation) error {
478478
}()
479479
}
480480

481+
if i == execWSStderr {
482+
// Consume websocket pings
483+
go func() {
484+
_, _, _ = conn.ReadMessage()
485+
}()
486+
}
487+
481488
if i == execWSStdin {
482489
err = <-ws.MirrorWrite(conn, ttys[i])
483490
_ = ttys[i].Close()

0 commit comments

Comments
 (0)