fix case where iob_send sends all from io batch, but then new data is

added and iob_send is called again
master
leitner 21 years ago
parent 523f6f4765
commit f4108178f2

@ -107,16 +107,17 @@ eagain:
else
return total?total:sent;
if (sent==b->bytesleft) {
b->bytesleft=0;
#ifdef TCP_CORK
if (b->bufs && b->files) {
static int zero=0;
setsockopt(s,IPPROTO_TCP,TCP_CORK,&zero,sizeof(zero));
}
#endif
iob_reset(b);
break;
} else if (sent>0) {
int64 rest=sent;
b->bytesleft-=rest;
for (i=0; e+i<last; ++i) {
if (e[i].n<=rest) {

Loading…
Cancel
Save