X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-api-ws.c;h=72f4cec44f97e39d427b5d8051fc2171a7f5811b;hb=99ad30bf29c683da833efeac42d8f178b6d2ca8c;hp=6b242e156db145f6b133517b9d1c389ffe01a7a4;hpb=51ab7c2f95d6d459302423a57cc617021ef6126d;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api-ws.c b/src/afb-api-ws.c index 6b242e15..72f4cec4 100644 --- a/src/afb-api-ws.c +++ b/src/afb-api-ws.c @@ -144,10 +144,10 @@ static void api_ws_server_listen_callback(void *closure, uint32_t revents, struc { struct api_ws_server *apiws = closure; - if ((revents & EPOLLIN) != 0) - api_ws_server_accept(apiws); - else if ((revents & EPOLLHUP) != 0) + if ((revents & EPOLLHUP) != 0) api_ws_server_connect(apiws); + else if ((revents & EPOLLIN) != 0) + api_ws_server_accept(apiws); } static void api_ws_server_disconnect(struct api_ws_server *apiws)