diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-08-20 12:32:02 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-08-20 12:42:56 +0200 |
commit | 99ad30bf29c683da833efeac42d8f178b6d2ca8c (patch) | |
tree | e2c082dbd05dbc91d91bda4e76498bcae1da22d1 /src/afb-ws.c | |
parent | 91de2500d8a3e96a5d6d486a31f51270eb8cdc61 (diff) |
Fix client disconnection closehalibut_8.0.2halibut_8.0.1halibut/8.0.2halibut/8.0.18.0.28.0.1
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/afb-ws.c')
-rw-r--r-- | src/afb-ws.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afb-ws.c b/src/afb-ws.c index fb31e4fe..bb35c9d1 100644 --- a/src/afb-ws.c +++ b/src/afb-ws.c @@ -132,10 +132,10 @@ static void aws_disconnect(struct afb_ws *ws, int call_on_hangup) static void fdevcb(void *ws, uint32_t revents, struct fdev *fdev) { - if ((revents & EPOLLIN) != 0) - aws_on_readable(ws); - else if ((revents & EPOLLHUP) != 0) + if ((revents & EPOLLHUP) != 0) afb_ws_hangup(ws); + else if ((revents & EPOLLIN) != 0) + aws_on_readable(ws); } /* |