summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/switchd/control.c')
-rw-r--r--usr.sbin/switchd/control.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/switchd/control.c b/usr.sbin/switchd/control.c
index b5ee43cb4dd..0cf1422c41c 100644
--- a/usr.sbin/switchd/control.c
+++ b/usr.sbin/switchd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.2 2016/07/20 21:01:06 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.3 2016/08/08 16:49:17 rzalamena Exp $ */
/*
* Copyright (c) 2010-2016 Reyk Floeter <reyk@openbsd.org>
@@ -309,7 +309,8 @@ control_dispatch_imsg(int fd, short event, void *arg)
}
if (event & EV_READ) {
- if ((n = imsg_read(&c->iev.ibuf)) == -1 || n == 0) {
+ if (((n = imsg_read(&c->iev.ibuf)) == -1 && errno != EAGAIN) ||
+ n == 0) {
control_close(fd, cs);
return;
}