mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-06-28 21:31:56 +02:00
mount: remove leftover socket file
This commit is contained in:
parent
3ab2c0e5c0
commit
86ed27f602
|
@ -108,10 +108,10 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
|
||||||
mountDirHash = -mountDirHash
|
mountDirHash = -mountDirHash
|
||||||
}
|
}
|
||||||
*option.localSocket = fmt.Sprintf("/tmp/seaweefs-mount-%d.sock", mountDirHash)
|
*option.localSocket = fmt.Sprintf("/tmp/seaweefs-mount-%d.sock", mountDirHash)
|
||||||
|
}
|
||||||
if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) {
|
if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) {
|
||||||
glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error())
|
glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
montSocketListener, err := net.Listen("unix", *option.localSocket)
|
montSocketListener, err := net.Listen("unix", *option.localSocket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Fatalf("Failed to listen on %s: %v", *option.localSocket, err)
|
glog.Fatalf("Failed to listen on %s: %v", *option.localSocket, err)
|
||||||
|
|
Loading…
Reference in a new issue