fix: s3 gateway DNS cache initialization (#10706)

fixes #10705
This commit is contained in:
Harshavardhana
2020-10-19 01:34:23 -07:00
committed by GitHub
parent ba5215561f
commit c107728676
4 changed files with 5 additions and 10 deletions

View File

@@ -20,7 +20,6 @@ import (
"context"
"errors"
"fmt"
"math/rand"
"net"
"os"
"os/signal"
@@ -362,9 +361,6 @@ func initAllSubsystems(ctx context.Context, newObject ObjectLayer) (err error) {
// serverMain handler called for 'minio server' command.
func serverMain(ctx *cli.Context) {
rand.Seed(time.Now().UTC().UnixNano())
globalDNSCache = xhttp.NewDNSCache(3*time.Second, 10*time.Second)
defer globalDNSCache.Stop()
signal.Notify(globalOSSignalCh, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)