Latest changes from upstream with commit message...
When the three possible return values are -1, 0, and 1, != 1 is the
same as <= 0. And the latter is the normal idiom so use that.
ok claudio@ henning@
--- 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;
}