From 44623de646cd885ff3bed81426d374549d556cbc Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Wed, 24 Mar 2021 17:06:35 +0900 Subject: [PATCH] Add IO exception checking to reduce warning logs. - When a problem occurs, there are cases where the result of g_source_query_unix_fd is (cond == 0). - Since too many warning logs may be output, exception handling was added to simply ignore it in this case. Change-Id: I694c5916c82d0969a86db8207ad8a64224e2fb25 Signed-off-by: Joonbum Ko --- src/tpl_utils_gthread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tpl_utils_gthread.c b/src/tpl_utils_gthread.c index 65a1db2..b024088 100644 --- a/src/tpl_utils_gthread.c +++ b/src/tpl_utils_gthread.c @@ -189,7 +189,9 @@ _thread_source_dispatch(GSource *source, GSourceFunc cb, gpointer data) g_mutex_unlock(&thread->thread_mutex); } } - } else { + } + + if (cond && !(cond & G_IO_IN)) { /* When some io errors occur, it is not considered as a critical error. * There may be problems with the screen, but it does not affect the operation. */ TPL_WARN("Invalid GIOCondition occured. tpl_gsource(%p) fd(%d) cond(%d)", -- 2.34.1