fix: fix heartbeat select to prevent leak (#13909)

fixes #13816
This commit is contained in:
Spike Curtis
2024-07-16 23:38:07 +04:00
committed by GitHub
parent 70c5c47efd
commit f21f2dce57

View File

@ -104,8 +104,7 @@ func TestHeartbeat(t *testing.T) {
select {
case <-hbCtx.Done():
return hbCtx.Err()
default:
heartbeatChan <- struct{}{}
case heartbeatChan <- struct{}{}:
return nil
}
}