ipfs/kubo

unix domain socket not removed if it exists

Open

#6.856 geöffnet am 31. Jan. 2020

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (2.725 Forks)batch import
help wantedkind/enhancementtopic/rpc-api

Repository-Metriken

Stars
 (13.906 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 2h) (28 gemergte PRs in 30 T)

Beschreibung

When using a unix domain socket, config: "API": [ "/ip4/127.0.0.1/tcp/5001", "/unix/var/db/ipfs-go/socket/api.sock" ],

the first time it starts up, it works fine, but the second time it fails:

Error: serveHTTPApi: manet.Listen(/unix/var/db/ipfs-go/socket/api.sock) failed: listen unix /var/db/ipfs-go/socket/api.sock: bind: address already in use

It is common for programs to either use a lock file, or just simply remove it on start.

I've worked around the issue by removing it in my startup file, but a better solution that is more generic would be nice.

Contributor Guide