mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Handle event loop watcher failure modes
When alibuEv event watcher callback has `UEV_ERROR` in the events mask we must handle the error. Unfortunately, in most cases there is not much we can do but ignore it or log the error. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
168da2a5c6
commit
6826d7ee3f
4 files changed
+52
-1
No files matched your search
+6
-1
@@ -142,7 +142,12 @@ static void socket_cb(uev_t *w, void *arg, int events)
|
||||
svc_t *svc = (svc_t *)arg, *task;
|
||||
int stdin;
|
||||
|
||||
_d("Got event on %s socket ...", svc->cmd);
|
||||
_d("%s: Got socket event ...", svc->cmd);
|
||||
if (UEV_ERROR == events) {
|
||||
logit(LOG_INFO, "%s: Socket error, aborting: %m", svc->cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
stdin = get_stdin(svc);
|
||||
if (stdin < 0) {
|
||||
logit(LOG_CRIT, "%s: Unable to accept incoming connection", svc->cmd);
|
||||
|
||||
Reference in new issue
Block a user