1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-16 15:41:03 +02:00

mount: remove leftover socket file

This commit is contained in:
chrislu 2022-04-07 00:33:13 -07:00
parent 3ab2c0e5c0
commit 86ed27f602

View file

@ -108,9 +108,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
mountDirHash = -mountDirHash
}
*option.localSocket = fmt.Sprintf("/tmp/seaweefs-mount-%d.sock", mountDirHash)
if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) {
glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error())
}
}
if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) {
glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error())
}
montSocketListener, err := net.Listen("unix", *option.localSocket)
if err != nil {