[core] reload c after chunkqueue_compact_mem()

reload c = cq->first after calling chunkqueue_compact_mem()
personal/stbuehler/tests-path
Glenn Strauss 2020-09-17 01:01:29 -04:00
parent edbfe36563
commit 10d9d14633
1 changed files with 3 additions and 1 deletions

View File

@ -616,8 +616,10 @@ static int connection_handle_read_state(connection * const con) {
if (NULL == c) continue;
clen = buffer_string_length(c->mem) - c->offset;
if (0 == clen) continue;
if (c->offset > USHRT_MAX) /*(highly unlikely)*/
if (c->offset > USHRT_MAX) { /*(highly unlikely)*/
chunkqueue_compact_mem(cq, clen);
c = cq->first; /*(reload c after chunkqueue_compact_mem())*/
}
hoff[0] = 1; /* number of lines */
hoff[1] = (unsigned short)c->offset; /* base offset for all lines */