From 3795a23efaa2e17d2ccddc68bebb1c46818d60ce Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Thu, 6 Aug 2020 14:49:46 +0200 Subject: [PATCH] libdlogutil: Increase the wait timeout for receiving fd from dlog_logger Default timeout of 500ms is easily exceeded on low-end and/or overloaded systems, causing dlogutil failures. This commit bumps the limit to 5s. Change-Id: Ia7083fef7fa2bd5bf790b9ab0758f9d2b1599823 --- src/libdlogutil/fdi_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libdlogutil/fdi_pipe.c b/src/libdlogutil/fdi_pipe.c index e17b131..572fef7 100644 --- a/src/libdlogutil/fdi_pipe.c +++ b/src/libdlogutil/fdi_pipe.c @@ -26,6 +26,8 @@ #include "fdi_pipe.h" #include "fdi_pipe_internal.h" +#define DEFAULT_WAIT_DLOGUTIL_PIPE_MS 5000; + static int pipe_get_capacity(struct fd_info *fdi, unsigned int *capacity) { assert(fdi); @@ -239,7 +241,7 @@ static int pipe_prepare_print(struct fd_info *fdi, int dump, bool monitor, dlogu if (r < 0) return r; - int pipe_fd = recv_pipe(ppd->sock_fd, DEFAULT_WAIT_PIPE_MS); + int pipe_fd = recv_pipe(ppd->sock_fd, DEFAULT_WAIT_DLOGUTIL_PIPE_MS); if (pipe_fd < 0) return pipe_fd; -- 2.7.4