Browse Source

Differentiate ready for writes from hangups in wait_write_select

master
ckolivas 10 years ago
parent
commit
8313628629
  1. 9
      src/libckpool.c

9
src/libckpool.c

@ -983,14 +983,19 @@ out:
int wait_write_select(int sockd, int timeout)
{
struct pollfd sfd;
int ret = -1;
if (unlikely(sockd < 0))
return -1;
goto out;
sfd.fd = sockd;
sfd.events = POLLOUT;
sfd.revents = 0;
timeout *= 1000;
return poll(&sfd, 1, timeout);
ret = poll(&sfd, 1, timeout);
if (ret && !(sfd.revents & POLLOUT))
ret = -1;
out:
return ret;
}
int write_length(int sockd, const void *buf, int len)

Loading…
Cancel
Save