EAGAIN handling for imsg_read. OK henning@ benno@

This commit is contained in:
claudio 2015-12-05 13:18:24 +00:00
parent 7236838dea
commit 0417f1f2be

3
proc.c
View File

@ -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;
}