Skip to content

Commit

Permalink
Closing a stream multiple times is now a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinFrazar committed Feb 24, 2025
1 parent 6a289e4 commit a352591
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/web/terminal/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ func (t *Stream) SessionCreated(s *tracessh.Session) error {
func (t *Stream) Close() error {
t.mu.Lock()
defer t.mu.Unlock()
if t.closed {
return nil
}
t.closed = true
if t.sshSession != nil {
return trace.NewAggregate(t.sshSession.Close(), t.WSStream.Close())
Expand Down

0 comments on commit a352591

Please sign in to comment.