mirror of
https://passt.top/passt
synced 2024-12-22 13:45:32 +00:00
passt: When probing for an existing instance, also accept ENOENT on connect()
The most common case is actually that no other instance created a socket with that name -- and that also means there is no other instance. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
7ab1b2a97a
commit
46b799c077
2
passt.c
2
passt.c
@ -104,7 +104,7 @@ static int sock_unix(int *index)
|
||||
|
||||
ex = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
|
||||
ret = connect(ex, (const struct sockaddr *)&addr, sizeof(addr));
|
||||
if (!ret || errno != ECONNREFUSED) {
|
||||
if (!ret || (errno != ENOENT && errno != ECONNREFUSED)) {
|
||||
close(ex);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user