Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 9fde889

Browse files
committed
test: don't hang on fail
1 parent c7d6f3d commit 9fde889

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

relay_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ func TestRelayReset(t *testing.T) {
193193

194194
func TestBasicRelayDial(t *testing.T) {
195195
ctx, cancel := context.WithCancel(context.Background())
196-
defer cancel()
197196

198197
hosts := getNetHosts(t, ctx, 3)
199198

@@ -213,6 +212,7 @@ func TestBasicRelayDial(t *testing.T) {
213212
)
214213

215214
defer func() {
215+
cancel()
216216
<-done
217217
if conn1 != nil {
218218
conn1.Close()

0 commit comments

Comments
 (0)