mount: adjust starting order

avoid possible nil wfs.Server
This commit is contained in:
Chris Lu
2021-06-06 20:22:42 -07:00
parent 44f1ba6894
commit e00443a940
2 changed files with 6 additions and 2 deletions

View File

@@ -246,6 +246,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
glog.V(0).Infof("mounted %s%s to %v", *option.filer, mountRoot, dir)
server := fs.New(c, nil)
seaweedFileSystem.Server = server
seaweedFileSystem.StartBackgroundTasks()
err = server.Serve(seaweedFileSystem)
// check if the mount process has an error to report