From 55f6cf1fa0d651c3b145a06473114f19bacd7d90 Mon Sep 17 00:00:00 2001 From: Alexandre Ioffe Date: Thu, 17 Mar 2022 16:53:47 -0700 Subject: [PATCH] EX-5000 lipe: lamigo ssh_channel_read on CentOS 8 Restart ssh_channel_read() after timeout (return 0). Test-Parameters: env=ONLY=72 trivial testlist=hot-pools Signed-off-by: Alexandre Ioffe Change-Id: I6ce5b6e941e432831452a31f8ea840abd4940821 Reviewed-on: https://review.whamcloud.com/46861 Tested-by: jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Alex Zhuravlev --- lipe/src/lamigo_alr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lipe/src/lamigo_alr.c b/lipe/src/lamigo_alr.c index 0f4cfbb..608ee0c 100644 --- a/lipe/src/lamigo_alr.c +++ b/lipe/src/lamigo_alr.c @@ -273,7 +273,9 @@ static int lamigo_alr_agent_run(struct alr_agent *ala) while (ssh_channel_is_open(channel) && !ssh_channel_is_eof(channel)) { rc = ssh_channel_read(channel, buffer + offset, sizeof(buffer) - offset, 0); - if (rc <= 0) + if (rc == 0) /* ssh_channel_read timeout */ + continue; + if (rc < 0) break; offset = lamigo_alr_parse(ala->ala_host, buffer, offset + rc, &received); now = time(NULL); -- 1.8.3.1