diff options
Diffstat (limited to 'src/account/indication_common.c')
-rw-r--r-- | src/account/indication_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/account/indication_common.c b/src/account/indication_common.c index 802bc28..d999176 100644 --- a/src/account/indication_common.c +++ b/src/account/indication_common.c @@ -118,6 +118,12 @@ bool watcher(AccountIndication *ind, void **data) watcher_init(ind); return false; } + if (len == 0) { + // We are at the eof + watcher_destroy(ind); + watcher_init(ind); + return true; + } while (i + (ssize_t) EVENT_SIZE < len) { struct inotify_event *event = (struct inotify_event *) &buffer[i]; if (i + (ssize_t) EVENT_SIZE + event->len > len) { |