summaryrefslogtreecommitdiff
path: root/imsgev.c
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@nimmagadda.net>2014-08-23 09:19:20 +0500
committerSunil Nimmagadda <sunil@nimmagadda.net>2014-08-23 09:19:20 +0500
commitf1447e0e75a4ccf9ad6c8802b13f12f8a0f901b8 (patch)
tree1f18af4aaa3b2b2ebe88cff1a67d9e82697b4907 /imsgev.c
parent66a429c7c9fc3b167160b2d9b82d418e8accde8d (diff)
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@
Diffstat (limited to 'imsgev.c')
-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;
}