BUGFIX handle error conditions of poll
diff --git a/src/notification_server.c b/src/notification_server.c
index 3d1ce7c..9099207 100644
--- a/src/notification_server.c
+++ b/src/notification_server.c
@@ -918,7 +918,10 @@
if (n) {
for (n = 0; n < count_pollfds; n++) {
- if (pollfds[n].revents & (POLLIN | POLLOUT)) {
+ if (pollfds[n].revents & (POLLHUP | POLLERR)) {
+ ERROR("notifications: poll pipe closed or error");
+ return -1;
+ } else if (pollfds[n].revents & (POLLIN | POLLOUT)) {
/*
* returns immediately if the fd does not
* match anything under libwebsockets