summaryrefslogtreecommitdiffstats
path: root/proc.c
diff options
context:
space:
mode:
authorclaudio <claudio>2015-12-05 13:18:24 +0000
committerclaudio <claudio>2015-12-05 13:18:24 +0000
commit0417f1f2bef1e8899dad4564db797250ae2c8c49 (patch)
tree680c2a1306da9bb3b52fc465681cce285feb97db /proc.c
parent7236838dead7885b90c6a57736433bea63c26599 (diff)
EAGAIN handling for imsg_read. OK henning@ benno@
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index 593c1b8b..5f51b0ac 100644
--- a/proc.c
+++ b/proc.c
@@ -61,7 +61,8 @@ proc_event_cb(__unused int fd, short events, void *arg)
struct imsg imsg;
if (!(peer->flags & PEER_BAD) && (events & EV_READ)) {
- if ((n = imsg_read(&peer->ibuf)) == -1 || n == 0) {
+ if (((n = imsg_read(&peer->ibuf)) == -1 && errno != EAGAIN) ||
+ n == 0) {
peer->dispatchcb(NULL, peer->arg);
return;
}