Browse Source

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

added and iob_send is called again
master
Felix von Leitner 17 years ago
parent
commit
315ab58746
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      io/iob_send.c

+ 6
- 5
io/iob_send.c View File

@ -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));
}
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