|
| 1 | +From b6588aa5aba1531277e78bb2824334acc52493eb Mon Sep 17 00:00:00 2001 |
| 2 | +From: sudhanshukumar22 <sudhanshu.kumar@broadcom.com> |
| 3 | +Date: Wed, 5 Mar 2025 00:55:58 -0800 |
| 4 | +Subject: [PATCH] [MGMTD] This error happens when we try to write to a socket or pipe |
| 5 | + which is already closed by peer. For e.g., the other side may have been |
| 6 | + killed during warmboot or using pkill. Hence, changing the log level to INFO |
| 7 | + |
| 8 | +--- |
| 9 | + lib/mgmt_msg.c | 4 +++- |
| 10 | + 1 file changed, 3 insertions(+), 1 deletion(-) |
| 11 | + |
| 12 | +diff --git a/lib/mgmt_msg.c b/lib/mgmt_msg.c |
| 13 | +index aff9af7e8..0a0f17ffe 100644 |
| 14 | +--- a/lib/mgmt_msg.c |
| 15 | ++++ b/lib/mgmt_msg.c |
| 16 | +@@ -28,6 +28,8 @@ |
| 17 | + #define MGMT_MSG_ERR(ms, fmt, ...) \ |
| 18 | + zlog_err("%s: %s: " fmt, (ms)->idtag, __func__, ##__VA_ARGS__) |
| 19 | + |
| 20 | ++#define MGMT_MSG_INFO(ms, fmt, ...) \ |
| 21 | ++ zlog_info("%s: %s: " fmt, (ms)->idtag, __func__, ##__VA_ARGS__) |
| 22 | + DEFINE_MTYPE(LIB, MSG_CONN, "msg connection state"); |
| 23 | + |
| 24 | + /** |
| 25 | +@@ -70,7 +72,7 @@ enum mgmt_msg_rsched mgmt_msg_read(struct mgmt_msg_state *ms, int fd, |
| 26 | + } |
| 27 | + if (n <= 0) { |
| 28 | + if (n == 0) |
| 29 | +- MGMT_MSG_ERR(ms, "got EOF/disconnect"); |
| 30 | ++ MGMT_MSG_INFO(ms, "got EOF/disconnect"); |
| 31 | + else |
| 32 | + MGMT_MSG_ERR(ms, |
| 33 | + "got error while reading: '%s'", |
| 34 | +-- |
| 35 | +2.39.4 |
| 36 | + |
0 commit comments