Browse Source

auto remove previous leftover socket

pull/3155/head
chrislu 3 years ago
parent
commit
8a1166c021
  1. 2
      weed/command/filer.go

2
weed/command/filer.go

@ -269,10 +269,10 @@ func (fo *FilerOptions) startFiler() {
if runtime.GOOS != "windows" {
if *fo.localSocket == "" {
*fo.localSocket = fmt.Sprintf("/tmp/seaweefs-filer-%d.sock", *fo.port)
}
if err := os.Remove(*fo.localSocket); err != nil && !os.IsNotExist(err) {
glog.Fatalf("Failed to remove %s, error: %s", *fo.localSocket, err.Error())
}
}
go func() {
// start on local unix socket
filerSocketListener, err := net.Listen("unix", *fo.localSocket)

Loading…
Cancel
Save