diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 2a8066767..1910e23a6 100644 --- a/src/lxc/lxccontainer.c +++ b/src/lxc/lxccontainer.c @@ -1971,11 +1971,8 @@ static bool do_lxcapi_reboot2(struct lxc_container *c, int timeout) } TRACE("Sent signal %d to pid %d", rebootsignal, pid); - if (timeout == 0) { - if (state_client_fd >= 0) - close(state_client_fd); + if (timeout == 0) return true; - } ret = lxc_cmd_sock_rcv_state(state_client_fd, timeout); close(state_client_fd);