Skip to content

Commit

Permalink
roachtest: explicitly close monitor reader after closing session
Browse files Browse the repository at this point in the history
Previously the reader did not close, even though the session is closed. This
change ensures the reader is closed by closing it after the session has been
closed. This seems to have only been a problem with local clusters.

Fixes: cockroachdb#116314

Epic: None
Release Note: None
  • Loading branch information
herkolategan committed Dec 13, 2023
1 parent 161d4f5 commit 4a4360c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/roachprod/install/cluster_synced.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,9 @@ wait
go func() {
<-monitorCtx.Done()
sess.Close()
if pc, ok := p.(io.ReadCloser); ok {
_ = pc.Close()
}
}()

readerWg.Wait()
Expand Down

0 comments on commit 4a4360c

Please sign in to comment.