mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
connectd: fix debug message on bind fail.
It doesn't get the right errno, and it says "create" not "bind". ``` 2022-05-20T03:04:46.498Z DEBUG connectd: Failed to create 2 socket: Success 2022-05-20T03:04:46.500Z DEBUG connectd: REPLY WIRE_CONNECTD_INIT_REPLY with 0 fds 2022-05-20T03:04:46.501Z DEBUG connectd: connectd_init_done 2022-05-20T03:04:46.503Z **BROKEN** connectd: Failed to bind socket for 127.0.0.1:37871: Address already in use ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
71b1eaf2fe
commit
a1b8b40d13
@ -1077,14 +1077,14 @@ static struct listen_fd *make_listen_fd(const tal_t *ctx,
|
||||
int on = 1;
|
||||
|
||||
if (fd < 0) {
|
||||
const char *es = strerror(errno);
|
||||
*errstr = tal_fmt(ctx, "Failed to create socket for %s%s: %s",
|
||||
is_websocket ? "websocket " : "",
|
||||
type_to_string(tmpctx,
|
||||
struct wireaddr_internal,
|
||||
wi),
|
||||
strerror(errno));
|
||||
status_debug("Failed to create %u socket: %s",
|
||||
domain, strerror(errno));
|
||||
es);
|
||||
status_debug("Failed to create %u socket: %s", domain, es);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1094,14 +1094,14 @@ static struct listen_fd *make_listen_fd(const tal_t *ctx,
|
||||
strerror(errno));
|
||||
|
||||
if (bind(fd, addr, len) != 0) {
|
||||
const char *es = strerror(errno);
|
||||
*errstr = tal_fmt(ctx, "Failed to bind socket for %s%s: %s",
|
||||
is_websocket ? "websocket " : "",
|
||||
type_to_string(tmpctx,
|
||||
struct wireaddr_internal,
|
||||
wi),
|
||||
strerror(errno));
|
||||
status_debug("Failed to create %u socket: %s",
|
||||
domain, strerror(errno));
|
||||
es);
|
||||
status_debug("Failed to bind %u socket: %s", domain, es);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user