X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafs-supervisor.c;h=8291713d16461c8d0fbf2fc24a1cb8d562e3d388;hb=65353dce81a629e042800bb7b86fcd869a76727e;hp=2afbf53a95a7cd271b10d89eed920c1eab4da76a;hpb=daecef104cd2a6ac3e4436306e96ed48aea8271d;p=src%2Fapp-framework-binder.git diff --git a/src/afs-supervisor.c b/src/afs-supervisor.c index 2afbf53a..8291713d 100644 --- a/src/afs-supervisor.c +++ b/src/afs-supervisor.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016-2019 "IoT.bzh" + * Copyright (C) 2015-2020 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -237,12 +237,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); } /*