mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
Handle UEV_ERROR properly in all libuev callbacks
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
5 files changed
+25
-4
No files matched your search
+8
-2
@@ -81,7 +81,12 @@ static void service_timeout_cb(uev_t *w, void *arg, int events)
|
||||
{
|
||||
svc_t *svc = arg;
|
||||
|
||||
/* Ignore any UEV_ERROR, we're a one-shot cb so just run it. */
|
||||
if (UEV_ERROR == events) {
|
||||
dbg("%s(): spurious problem, svc %s.", __func__, svc_ident(svc, NULL, 0));
|
||||
uev_timer_start(w);
|
||||
return;
|
||||
}
|
||||
|
||||
if (svc->timer_cb)
|
||||
svc->timer_cb(svc);
|
||||
}
|
||||
@@ -2875,7 +2880,7 @@ void service_notify_cb(uev_t *w, void *arg, int events)
|
||||
ssize_t len;
|
||||
|
||||
if (UEV_ERROR == events) {
|
||||
warn("Spurious problem with %s notify callback, restarting.", svc_ident(svc, NULL, 0));
|
||||
dbg("Spurious problem with %s notify callback, restarting.", svc_ident(svc, NULL, 0));
|
||||
uev_io_start(w);
|
||||
return;
|
||||
}
|
||||
@@ -2933,6 +2938,7 @@ static void service_interval_cb(uev_t *w, void *arg, int events)
|
||||
|
||||
(void)arg;
|
||||
if (UEV_ERROR == events) {
|
||||
dbg("%s(): spurious problem, restarting.", __func__);
|
||||
uev_timer_start(w);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user