From f581cb14ac091b89a22300fd4f5f048a951ecd7b Mon Sep 17 00:00:00 2001 From: Sung-Jin Park Date: Tue, 9 Nov 2021 17:01:33 +0900 Subject: [PATCH] pepper-inotify: fix to remove an event source when error/hangup comes from it Change-Id: Ia0c3f7b96fe7f2f0be4b73c58f63ed2bb83057ac Signed-off-by: Sung-Jin Park --- src/lib/inotify/pepper-inotify.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/inotify/pepper-inotify.c b/src/lib/inotify/pepper-inotify.c index 727be5a..db2c4f1 100644 --- a/src/lib/inotify/pepper-inotify.c +++ b/src/lib/inotify/pepper-inotify.c @@ -88,8 +88,7 @@ _inotify_fd_read(int fd, uint32_t mask, void *data) if (watch_data->event_source) wl_event_source_fd_update(watch_data->event_source, (uint32_t)0); - - close(fd); + wl_event_source_remove(watch_data->event_source); return 0; } -- 2.34.1