From 307920aff38a933a7df5245917933a35f9cf7a15 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Thu, 6 Jun 2019 22:48:38 -0400 Subject: [PATCH 106/140] set timeout to 1s for cmds send to [lxc monitor] Signed-off-by: LiFeng --- src/lxc/commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/commands.c b/src/lxc/commands.c index c74b8c1..0802a16 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -127,10 +127,10 @@ static int lxc_cmd_rsp_recv(int sock, struct lxc_cmd_rr *cmd) int ret, rspfd; struct lxc_cmd_rsp *rsp = &cmd->rsp; - /*isulad: add timeout 200ms to avoid long block due to [lxc monitor] error*/ - ret = lxc_abstract_unix_recv_fds_timeout(sock, &rspfd, 1, rsp, sizeof(*rsp), 200 * 1000); + /*isulad: add timeout 1s to avoid long block due to [lxc monitor] error*/ + ret = lxc_abstract_unix_recv_fds_timeout(sock, &rspfd, 1, rsp, sizeof(*rsp), 1000 * 1000); if (ret < 0) { - SYSWARN("Failed to receive response for command \"%s\"", + SYSERROR("Failed to receive response for command \"%s\"", lxc_cmd_str(cmd->req.cmd)); if (errno == ECONNRESET || errno == EAGAIN || errno == EWOULDBLOCK) { -- 1.8.3.1