Mercurial > pidgin
diff libpurple/protocols/oscar/peer_proxy.c @ 17448:648551e3243a
Only check for EAGAIN if send returns -1, not when it returns 0
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 03 Jun 2007 19:04:22 +0000 |
parents | 32c366eeeb99 |
children | 44b4e8bd759b |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/peer_proxy.c Sun Jun 03 18:36:54 2007 +0000 +++ b/libpurple/protocols/oscar/peer_proxy.c Sun Jun 03 19:04:22 2007 +0000 @@ -224,7 +224,7 @@ } /* If there was an error then close the connection */ - if (read == -1) + if (read < 0) { if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) /* No worries */ @@ -285,7 +285,8 @@ return; } - if (read == -1) + /* If there was an error then close the connection */ + if (read < 0) { if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) /* No worries */