summaryrefslogtreecommitdiff
path: root/sbin/iked/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/iked/control.c')
-rw-r--r--sbin/iked/control.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c
index 84142055a9d..71c46b20954 100644
--- a/sbin/iked/control.c
+++ b/sbin/iked/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.43 2024/11/21 13:17:56 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.44 2024/11/21 13:21:34 claudio Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -261,8 +261,7 @@ control_dispatch_imsg(int fd, short event, void *arg)
}
if (event & EV_READ) {
- if (((n = imsgbuf_read(&c->iev.ibuf)) == -1 &&
- errno != EAGAIN) || n == 0) {
+ if (imsgbuf_read(&c->iev.ibuf) != 1) {
control_close(fd, cs);
return;
}