-/* $OpenBSD: client.c,v 1.80 2014/04/29 22:31:22 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.81 2014/07/13 20:51:08 krw Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
}
if (events & EV_WRITE) {
- if (msgbuf_write(&client_ibuf.w) < 0 && errno != EAGAIN)
+ if (msgbuf_write(&client_ibuf.w) <= 0 && errno != EAGAIN)
goto lost_server;
}
-/* $OpenBSD: server-client.c,v 1.121 2014/07/13 20:23:10 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.122 2014/07/13 20:51:08 krw Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
return;
if (fd == c->ibuf.fd) {
- if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) < 0 &&
+ if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) <= 0 &&
errno != EAGAIN)
goto client_lost;