From 2d3b1f900edcb0f08915526e01adb17d1c829180 Mon Sep 17 00:00:00 2001 From: Dustin Ward Date: Fri, 11 Jun 2021 12:48:03 -0400 Subject: [PATCH] grpc: prevent deadlock in Test/ClientUpdatesParamsAfterGoAway on failure (#4534) --- clientconn_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clientconn_test.go b/clientconn_test.go index 6c61666b7efb..a50db9419c2a 100644 --- a/clientconn_test.go +++ b/clientconn_test.go @@ -735,16 +735,15 @@ func (s) TestClientUpdatesParamsAfterGoAway(t *testing.T) { time.Sleep(10 * time.Millisecond) cc.mu.RLock() v := cc.mkp.Time + cc.mu.RUnlock() if v == 20*time.Second { // Success - cc.mu.RUnlock() return } if ctx.Err() != nil { // Timeout t.Fatalf("cc.dopts.copts.Keepalive.Time = %v , want 20s", v) } - cc.mu.RUnlock() } }