summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-26 21:39:14 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-26 21:39:14 +0200
commit641e01dcdcc810026ee4156d1694d97e10a1ba07 (patch)
tree92de1ecd3d12ca745a2d3dc4f06a8cb737d97024 /src/socket.c
parentaa4355f295c76704baec08509e80fcb827c023da (diff)
socket: improve warning message when we get POLLHUP
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/socket.c b/src/socket.c
index ad67215c1f..0a18716cd7 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -1679,7 +1679,12 @@ static void socket_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
log_debug("Incoming traffic on %s", u->meta.id);
if (events != EPOLLIN) {
- log_error("%s: Got invalid poll event (0x%x) on socket.", u->meta.id, events);
+
+ if (events & EPOLLHUP)
+ log_error("%s: Got POLLHUP on a listening socket. The service probably invoked shutdown() on it, and should better not do that.", u->meta.id);
+ else
+ log_error("%s: Got unexpected poll event (0x%x) on socket.", u->meta.id, events);
+
goto fail;
}