imsgev.c
changeset 28 0f57e2995a16
parent 0 9e2cb1ed20b1
--- a/imsgev.c	Wed Aug 20 21:46:02 2014 +0500
+++ b/imsgev.c	Sat Aug 23 09:19:50 2014 +0500
@@ -138,7 +138,7 @@
 		 * 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;
 		}