Fix flushing of large number of entries

Checking for errors would cause some responses to be lost.
This commit is contained in:
Stephen Hemminger 2009-07-13 10:15:23 -07:00
parent 1558971d43
commit 2d8240f8d9
1 changed files with 2 additions and 2 deletions

View File

@ -121,8 +121,8 @@ int rtnl_send_check(struct rtnl_handle *rth, const char *buf, int len)
if (status < 0)
return status;
/* Check for errors */
status = recv(rth->fd, resp, sizeof(resp), MSG_DONTWAIT);
/* Check for immediate errors */
status = recv(rth->fd, resp, sizeof(resp), MSG_DONTWAIT|MSG_PEEK);
if (status < 0) {
if (errno == EAGAIN)
return 0;