Skip to content

Commit 2d3b1f9

Browse files
authored
grpc: prevent deadlock in Test/ClientUpdatesParamsAfterGoAway on failure (#4534)
1 parent 6351a55 commit 2d3b1f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clientconn_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,16 +735,15 @@ func (s) TestClientUpdatesParamsAfterGoAway(t *testing.T) {
735735
time.Sleep(10 * time.Millisecond)
736736
cc.mu.RLock()
737737
v := cc.mkp.Time
738+
cc.mu.RUnlock()
738739
if v == 20*time.Second {
739740
// Success
740-
cc.mu.RUnlock()
741741
return
742742
}
743743
if ctx.Err() != nil {
744744
// Timeout
745745
t.Fatalf("cc.dopts.copts.Keepalive.Time = %v , want 20s", v)
746746
}
747-
cc.mu.RUnlock()
748747
}
749748
}
750749

0 commit comments

Comments
 (0)