Browse Source

fix: copy value instead of pointer for metricsHttpIp default

Address review comment to avoid pointer aliasing. Copy the value
instead of the pointer to prevent unexpected side effects if the
bindIp value is modified later.
pull/7646/head
chrislu 3 days ago
parent
commit
3ccb4a2cdf
  1. 2
      weed/command/filer.go

2
weed/command/filer.go

@ -234,7 +234,7 @@ func runFiler(cmd *Command, args []string) bool {
}
// Set S3 metrics IP based on bind IP if not explicitly set
if *filerS3Options.metricsHttpIp == "" {
filerS3Options.metricsHttpIp = filerS3Options.bindIp
*filerS3Options.metricsHttpIp = *filerS3Options.bindIp
}
go func(delay time.Duration) {
time.Sleep(delay * time.Second)

Loading…
Cancel
Save