socket_read_line(): reset buffer offset when no bytes are left

socket_read() already did that.
This commit is contained in:
Oswald Buddenhagen 2022-06-09 11:18:53 +02:00
parent 69653aafeb
commit 6f15980cd9

View File

@ -834,7 +834,7 @@ socket_read_line( conn_t *conn )
}
uint n = (uint)(p + 1 - s);
cnt -= n;
conn->offset = off + n;
conn->offset = cnt ? off + n : 0;
conn->bytes = cnt;
conn->scanoff = 0;
if (p != s && p[-1] == '\r')