diff --git a/fs/rc/rc.go b/fs/rc/rc.go index 9c083f3b7..e41ac9546 100644 --- a/fs/rc/rc.go +++ b/fs/rc/rc.go @@ -85,7 +85,7 @@ var OptionsInfo = fs.Options{{ Groups: "RC", }, { Name: "metrics_addr", - Default: []string{""}, + Default: []string{}, Help: "IPaddress:Port or :Port to bind metrics server to", Groups: "Metrics", }}. diff --git a/fs/rc/rcserver/metrics.go b/fs/rc/rcserver/metrics.go index 502566f47..367e6aeab 100644 --- a/fs/rc/rcserver/metrics.go +++ b/fs/rc/rcserver/metrics.go @@ -37,7 +37,7 @@ func init() { // If the server wasn't configured the *Server returned may be nil func MetricsStart(ctx context.Context, opt *rc.Options) (*MetricsServer, error) { jobs.SetOpt(opt) // set the defaults for jobs - if opt.MetricsHTTP.ListenAddr[0] != "" { + if len(opt.MetricsHTTP.ListenAddr) > 0 { // Serve on the DefaultServeMux so can have global registrations appear s, err := newMetricsServer(ctx, opt) if err != nil {