Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion ccan/ccan/io/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ void *io_loop(struct timers *timers, struct timer **expired)

fairness_counter++;
for (size_t rotation = 0; rotation < num_fds && !io_loop_return; rotation++) {
socklen_t errno_len = sizeof(errno);
struct io_conn *c;
int events;

Expand Down Expand Up @@ -469,8 +470,18 @@ void *io_loop(struct timers *timers, struct timer **expired)
r--;
io_ready(c, events);
} else if (events & (POLLHUP|POLLNVAL|POLLERR)) {
/* On `connect` failure, Linux typically
* returns POLLIN|POLLERR. MacOS returns either
* POLLHUP|POLLERR or POLLOUT|POLLHUP depending
* on version, setting the socket error to
* ECONNREFUSED. */
r--;
errno = EBADF;
/* Get fd's specific error to find Mac's
* ECONNREFUSED, among others */
if(getsockopt(fds[i]->fd, SOL_SOCKET, SO_ERROR,
&errno, &errno_len) == -1) {
errno = EBADF;
}
io_close(c);
}
}
Expand Down
2 changes: 1 addition & 1 deletion channeld/channeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -3901,7 +3901,7 @@ static void resume_splice_negotiation(struct peer *peer,
txsig_tlvs = tlv_txsigs_tlvs_new(tmpctx);
txsig_tlvs->shared_input_signature = &splice_sig.s;

/* DTODO: is this finalize call required? */
/* This will delete the signatures from psbt and fill the witness if they're valid */
psbt_finalize(current_psbt);

outws = psbt_to_witnesses(tmpctx, current_psbt,
Expand Down
Loading
Loading