X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmanager.c;h=c26dcaa9996dc97c777d900fee291b870effc21c;hb=be04cbca6c2c03e9f62e8981cb9b5626c118c953;hp=d8d5667dc295c6d64c5fd9241f390693fcddc014;hpb=9bf3b53533cdc9b95c921b71da755401f223f765;p=elogind.git diff --git a/src/core/manager.c b/src/core/manager.c index d8d5667dc..c26dcaa99 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2208,8 +2208,10 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) { if (safe_atoi(l + 10, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd)) log_debug("Failed to parse notify fd: %s", l + 10); else { - if (m->notify_fd >= 0) + if (m->notify_fd >= 0) { + m->notify_event_source = sd_event_source_unref(m->notify_event_source); close_nointr_nofail(m->notify_fd); + } m->notify_fd = fdset_remove(fds, fd); }