Skip to content

Commit

Permalink
grpc: prevent deadlock in Test/ClientUpdatesParamsAfterGoAway on fail…
Browse files Browse the repository at this point in the history
…ure (#4534)
  • Loading branch information
dustin-ward authored Jun 11, 2021
1 parent 6351a55 commit 2d3b1f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions clientconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit 2d3b1f9

Please sign in to comment.