summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/logind/logind.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c
index d322e16c..3e411e02 100644
--- a/daemon/logind/logind.c
+++ b/daemon/logind/logind.c
@@ -1117,8 +1117,12 @@ client_cb(int fd, short event, void *arg)
if ( (len = read(fd, buf, sizeof(buf))) <= 0)
{
- if (errno == EINTR || errno == EAGAIN)
- return;
+ // case to continue:
+ if ((len < 0) && (errno == EINTR || errno == EAGAIN))
+ return;
+
+ // len == 0: EOF
+ // len < 0: any other error.
// close connection
login_conn_remove(conn, fd, 0);