Skip to content

Commit

Permalink
Temp comment out new condition - to be removed if it fixes CRI-O
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Gooch <[email protected]>
  • Loading branch information
goochjj committed Sep 15, 2020
1 parent 6628524 commit 0a36f41
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/conn_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,18 +325,19 @@ static gboolean terminate_remote_sock(struct remote_sock_s *sock)
{
remote_sock_shutdown(sock, SHUT_RD);
if (SOCK_IS_CONSOLE(sock->sock_type)) {
if (sock->dest->readers == NULL || sock->dest->readers->len == 0) {
if (*(sock->dest->fd) >= 0 && opt_stdin) {
if (!opt_leave_stdin_open) {
close(*(sock->dest->fd));
*(sock->dest->fd) = -1;
} else {
ninfo("Not closing input");
}
// If we're terminating our STDIN holder, we need to close the FD too, based on the cmdline
// if (sock->dest->readers == NULL || sock->dest->readers->len == 0) {
if (*(sock->dest->fd) >= 0 && opt_stdin) {
if (!opt_leave_stdin_open) {
close(*(sock->dest->fd));
*(sock->dest->fd) = -1;
} else {
ninfo("Not closing input");
}
} else {
ninfo("Not closing input - still have open sockets");
}
//} else {
// ninfo("Not closing input - still have open sockets");
//}
}
return G_SOURCE_REMOVE;
}
Expand Down

0 comments on commit 0a36f41

Please sign in to comment.