Browse Source

Generically set send/recv buffers larger on passthroughs

master
Con Kolivas 9 years ago
parent
commit
9f23616dfc
  1. 2
      src/ckpool.h
  2. 6
      src/generator.c

2
src/ckpool.h

@ -82,7 +82,7 @@ struct connsock {
int buflen;
int bufsize;
int rcvbufsiz;
bool rcvbufsiz_setfail;
int sendbufsiz;
ckpool_t *ckp;
/* Semaphore used to serialise request/responses */

6
src/generator.c

@ -445,6 +445,12 @@ static bool connect_proxy(ckpool_t *ckp, connsock_t *cs, proxy_instance_t *proxy
cs->fd, proxy->epfd);
return false;
}
} else {
/* We want large send/recv buffers on passthroughs */
if (!ckp->rmem_warn)
cs->rcvbufsiz = set_recvbufsize(ckp, cs->fd, 1048576);
if (!ckp->wmem_warn)
cs->sendbufsiz = set_sendbufsize(ckp, cs->fd, 1048576);
}
return true;
}

Loading…
Cancel
Save