mark pubsub type safe via generics (#15961)

This commit is contained in:
Klaus Post
2022-10-28 19:55:42 +02:00
committed by GitHub
parent 6d22e74d11
commit 71954faa3a
11 changed files with 91 additions and 105 deletions

View File

@@ -22,7 +22,6 @@ import (
"runtime"
"github.com/minio/madmin-go"
"github.com/minio/minio/internal/pubsub"
)
// healTask represents what to heal along with options
@@ -54,7 +53,7 @@ type healRoutine struct {
func activeListeners() int {
// Bucket notification and http trace are not costly, it is okay to ignore them
// while counting the number of concurrent connections
return int(globalHTTPListen.NumSubscribers(pubsub.MaskAll)) + int(globalTrace.NumSubscribers(pubsub.MaskAll))
return int(globalHTTPListen.Subscribers()) + int(globalTrace.Subscribers())
}
func waitForLowHTTPReq() {