Skip to content

Commit

Permalink
Consume websocket pings for stderr
Browse files Browse the repository at this point in the history
Fixes: #1289
  • Loading branch information
stefanor committed Nov 15, 2024
1 parent 795717f commit afca45e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/incusd/instance_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ func (s *execWs) Do(op *operations.Operation) error {
}()
}

if i == execWSStderr {
// Consume websocket pings
go func() {
_, _, _ = conn.ReadMessage()
}()
}

if i == execWSStdin {
err = <-ws.MirrorWrite(conn, ttys[i])
_ = ttys[i].Close()
Expand Down

0 comments on commit afca45e

Please sign in to comment.