Update copyright dates
[src/app-framework-binder.git] / src / afb-ws.c
index fb31e4f..1db9ad5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2019 "IoT.bzh"
+ * Copyright (C) 2015-2020 "IoT.bzh"
  * Author: José Bollo <jose.bollo@iot.bzh>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -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);
 }
 
 /*