volume: best effort to detect ip address

fix https://github.com/chrislusf/seaweedfs/issues/1264
This commit is contained in:
Chris Lu
2020-04-09 00:26:24 -07:00
parent f6a7e79dc3
commit 59f40e2027
2 changed files with 26 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
}
if *v.ip == "" {
*v.ip = "127.0.0.1"
*v.ip = util.DetectedHostAddress()
}
if *v.publicPort == 0 {