Skip to content

Commit

Permalink
conn_sock: do not fail on EAGAIN
Browse files Browse the repository at this point in the history
commit 6287bd8 introduced the
regression.

writes to the attached sockets must be blocking, otherwise the
write_back_to_remote_consoles() shutdowns the socket when write fails
with EAGAIN.

I've verified the original issue fixed with commit 62887bd is not
reintroduced with this patch.

Closes: #236

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe authored and haircommander committed Feb 2, 2021
1 parent de1a153 commit 2b87314
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/conn_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ static gboolean attach_cb(int fd, G_GNUC_UNUSED GIOCondition condition, gpointer
pexit("Failed to allocate memory");
}
init_remote_sock(remote_sock, srcsock);
g_unix_set_fd_nonblocking(new_fd, TRUE, NULL);
remote_sock->fd = new_fd;
g_unix_fd_add(remote_sock->fd, G_IO_IN | G_IO_HUP | G_IO_ERR, remote_sock_cb, remote_sock);
g_ptr_array_add(remote_sock->dest->readers, remote_sock);
Expand Down

0 comments on commit 2b87314

Please sign in to comment.