Skip to content

Commit

Permalink
internal/resolver: fix possible goroutine leak in TestSafeConfigSelec…
Browse files Browse the repository at this point in the history
…tor (#5058)
  • Loading branch information
charlesxsh committed Dec 22, 2021
1 parent 956c594 commit 7506755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/resolver/config_selector_test.go
Expand Up @@ -112,7 +112,7 @@ func (s) TestSafeConfigSelector(t *testing.T) {

cs1Done := false // set when cs2 is first called
for dl := time.Now().Add(150 * time.Millisecond); !time.Now().After(dl); {
gotConfigChan := make(chan *RPCConfig)
gotConfigChan := make(chan *RPCConfig, 1)
go func() {
cfg, _ := scs.SelectConfig(testRPCInfo)
gotConfigChan <- cfg
Expand Down

0 comments on commit 7506755

Please sign in to comment.