32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From 412831f8677bfe78a9e473a473c29e1441cf7fe9 Mon Sep 17 00:00:00 2001
|
|
From: LiFeng <lifeng68@huawei.com>
|
|
Date: Thu, 6 Jun 2019 22:48:38 -0400
|
|
Subject: [PATCH 106/131] set timeout to 1s for cmds send to [lxc monitor]
|
|
|
|
Signed-off-by: LiFeng <lifeng68@huawei.com>
|
|
---
|
|
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 c74b8c1f..0802a167 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) {
|
|
--
|
|
2.23.0
|
|
|