Skip to content

Commit

Permalink
itest: close context after closing conn for client
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorTigerstrom committed Jan 17, 2024
1 parent 6055a75 commit 1c43c9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion itest/client_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ func (c *clientHarness) start() error {
}

func (c *clientHarness) cleanup() error {
c.cancel()
// We cancel the context after closing the connection, as it's used
// during the connection closing process. We defer the cancel to make
// sure it's always canceled.
defer c.cancel()

return c.grpcConn.Close()
}

0 comments on commit 1c43c9f

Please sign in to comment.