Skip to content

Commit 6b5ca8b

Browse files
committed
itest: close context after closing conn for client
1 parent b447950 commit 6b5ca8b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

itest/client_harness.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ func (c *clientHarness) start() error {
119119
}
120120

121121
func (c *clientHarness) cleanup() error {
122-
c.cancel()
122+
// we always want to cancel the context, even if
123+
// c.grpcConn.Close() returns an error.
124+
defer c.cancel()
125+
123126
return c.grpcConn.Close()
124127
}

0 commit comments

Comments
 (0)