mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
avoid data race access to startDelay (#3548)
This commit is contained in:
parent
570b488572
commit
903a06a160
|
@ -173,29 +173,29 @@ func runFiler(cmd *Command, args []string) bool {
|
||||||
if *f.dataCenter != "" && *filerS3Options.dataCenter == "" {
|
if *f.dataCenter != "" && *filerS3Options.dataCenter == "" {
|
||||||
filerS3Options.dataCenter = f.dataCenter
|
filerS3Options.dataCenter = f.dataCenter
|
||||||
}
|
}
|
||||||
go func() {
|
go func(delay time.Duration) {
|
||||||
time.Sleep(startDelay * time.Second)
|
time.Sleep(delay * time.Second)
|
||||||
filerS3Options.startS3Server()
|
filerS3Options.startS3Server()
|
||||||
}()
|
}(startDelay)
|
||||||
startDelay++
|
startDelay++
|
||||||
}
|
}
|
||||||
|
|
||||||
if *filerStartWebDav {
|
if *filerStartWebDav {
|
||||||
filerWebDavOptions.filer = &filerAddress
|
filerWebDavOptions.filer = &filerAddress
|
||||||
go func() {
|
go func(delay time.Duration) {
|
||||||
time.Sleep(startDelay * time.Second)
|
time.Sleep(delay * time.Second)
|
||||||
filerWebDavOptions.startWebDav()
|
filerWebDavOptions.startWebDav()
|
||||||
}()
|
}(startDelay)
|
||||||
startDelay++
|
startDelay++
|
||||||
}
|
}
|
||||||
|
|
||||||
if *filerStartIam {
|
if *filerStartIam {
|
||||||
filerIamOptions.filer = &filerAddress
|
filerIamOptions.filer = &filerAddress
|
||||||
filerIamOptions.masters = f.mastersString
|
filerIamOptions.masters = f.mastersString
|
||||||
go func() {
|
go func(delay time.Duration) {
|
||||||
time.Sleep(startDelay * time.Second)
|
time.Sleep(delay * time.Second)
|
||||||
filerIamOptions.startIamServer()
|
filerIamOptions.startIamServer()
|
||||||
}()
|
}(startDelay)
|
||||||
}
|
}
|
||||||
|
|
||||||
f.masters = pb.ServerAddresses(*f.mastersString).ToAddressMap()
|
f.masters = pb.ServerAddresses(*f.mastersString).ToAddressMap()
|
||||||
|
|
Loading…
Reference in a new issue