Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

auto remove previous leftover socket

chrislu8a1166c02145
diff --git a/weed/command/filer.go b/weed/command/filer.go
index 989ed3bd08..2c91e6fec5 100644
--- a/weed/command/filer.go
+++ b/weed/command/filer.go
@@ -269,9 +269,9 @@ 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())
- }
+ }
+ 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