Add IO exception checking to reduce warning logs. 12/255912/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Wed, 24 Mar 2021 08:06:35 +0000 (17:06 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Wed, 24 Mar 2021 08:06:37 +0000 (17:06 +0900)
 - 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 <joonbum.ko@samsung.com>
src/tpl_utils_gthread.c

index 65a1db2..b024088 100644 (file)
@@ -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)",