X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=blobdiff_plain;f=src%2Fafs-supervisor.c;h=9746a0f342e781c3930131aab7bb70174bafed50;hp=31b8b7c3b6c901f8c1c8a2cbc3d19226876f6d42;hb=99ad30bf29c683da833efeac42d8f178b6d2ca8c;hpb=91de2500d8a3e96a5d6d486a31f51270eb8cdc61 diff --git a/src/afs-supervisor.c b/src/afs-supervisor.c index 31b8b7c3..9746a0f3 100644 --- a/src/afs-supervisor.c +++ b/src/afs-supervisor.c @@ -280,12 +280,12 @@ static void accept_supervision_link(int sock) */ static void listening(void *closure, uint32_t revents, struct fdev *fdev) { - if ((revents & EPOLLIN) != 0) - accept_supervision_link((int)(intptr_t)closure); - else if ((revents & EPOLLHUP) != 0) { + if ((revents & EPOLLHUP) != 0) { ERROR("supervision socket closed"); exit(1); } + if ((revents & EPOLLIN) != 0) + accept_supervision_link((int)(intptr_t)closure); } /*