aboutsummaryrefslogtreecommitdiffstats
path: root/src/afs-supervisor.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-08-20 12:32:02 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-08-20 19:29:12 +0200
commit248f6eafa20476014f4bf12d90b2234c4be7eef2 (patch)
treecc4d2235e985f354e2b4cf0550cdf6a17f1ecb53 /src/afs-supervisor.c
parent0abe8de32bef957b2f72eee7c7eb30c3a9a9efeb (diff)
Fix client disconnection closeguppy_7.0.4guppy/7.0.47.0.4guppy
Before that change, the client disconection made a loop on read but wasn't closing the link. Bug-AGL: SPEC-2759 Signed-off-by: José Bollo <jose.bollo@iot.bzh> Change-Id: Iecfbb95cb1b7079e695ff5c08155b2310bf4b8d8
Diffstat (limited to 'src/afs-supervisor.c')
-rw-r--r--src/afs-supervisor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afs-supervisor.c b/src/afs-supervisor.c
index 5bc31ea9..7f87adbf 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);
}
/*