fix received data incorrect arithmetics

subtract HTTP header otherwise connection is closed before all data is
received.
master
tiptorrent development team 2022-02-12 12:54:34 +01:00
parent cc67335f13
commit 86beaee6e6
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ static int tip_client_get_hdr(struct tip_client *cli)
header_len = trailer - cli->buf;
payload = cli->buf + header_len;
payload_len = cli->buf_len - header_len;
cli->data_len += cli->buf_len;
cli->data_len += payload_len;
cli->buf_len = 0;
gettimeofday(&cli->tv_start, NULL);
cli->tv_last = cli->tv_start;