Commit 5c294060 by Daniel Lezcano Committed by Daniel Lezcano

Fix console infinite loop

When the client console exits, the mainloop goes in an infinite loop as the handler is not removed and we are notified from the disconnection indefinitely. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 82d89dce
......@@ -237,6 +237,13 @@ static int console_handler(int fd, void *data, struct lxc_epoll_descr *descr)
return 1;
}
if (!r) {
INFO("console client has exited");
lxc_mainloop_del_handler(descr, fd);
close(fd);
return 0;
}
/* no output for the console, do nothing */
if (console->peer == -1)
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment