summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--imsgev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imsgev.c b/imsgev.c
index 6b92d79..6daa4d1 100644
--- a/imsgev.c
+++ b/imsgev.c
@@ -138,7 +138,7 @@ imsgev_dispatch(int fd, short ev, void *humppa)
* closed, or some error occured. Both case are not recoverable
* from the imsg perspective, so we treat it as a WRITE error.
*/
- if ((n = msgbuf_write(&ibuf->w)) != 1) {
+ if ((n = msgbuf_write(&ibuf->w)) <= 0 && errno != EAGAIN) {
imsgev_disconnect(iev, IMSGEV_EWRITE);
return;
}