diff --git a/pkg/server/minhttp/listen.go b/pkg/server/minhttp/listen.go index 3053c581c..5792f95e1 100644 --- a/pkg/server/minhttp/listen.go +++ b/pkg/server/minhttp/listen.go @@ -18,6 +18,7 @@ package minhttp import ( "net" + "os" "sync" "github.com/minio/minio/pkg/iodine" @@ -37,6 +38,12 @@ type rateLimitListener struct { func (l *rateLimitListener) accept() { l.sem <- struct{}{} } func (l *rateLimitListener) release() { <-l.sem } +// File - necessary to expose underlying socket fd +func (l *rateLimitListener) File() (f *os.File, err error) { + return l.Listener.(fileListener).File() +} + +// Accept - accept method for accepting new connections func (l *rateLimitListener) Accept() (net.Conn, error) { l.accept()