[core] TCP_CORK w/ MEM_CHUNK then FILE_CHUNK

TCP_CORK with MEM_CHUNK followed by FILE_CHUNK,
or multiple MEM_CHUNK with TLS
personal/stbuehler/tests-path
Glenn Strauss 2021-08-29 03:23:08 -04:00
parent ad8a27f356
commit 33808a2e73
1 changed files with 2 additions and 2 deletions

View File

@ -283,9 +283,9 @@ connection_write_chunkqueue (connection * const con, chunkqueue * const restrict
* walked the entire chunkqueue (on each and every call). The loads here
* make a measurable difference in performance in underlying call to
* con->network_write() */
if (cq->first->next) {
if (cq->first->next && cq->first->type == MEM_CHUNK) {
const chunk *c = cq->first;
while (c->type == MEM_CHUNK && NULL != (c = c->next)) ;
do { c = c->next; } while (c && c->type == MEM_CHUNK);
#ifdef TCP_CORK
/* Linux: put a cork into socket as we want to combine write() calls
* but only if we really have multiple chunks including non-MEM_CHUNK