Skip to content

Commit

Permalink
fixup pingpong moredata as long as the recvbug has content left
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Jan 23, 2024
1 parent c0c4ed7 commit 002d24a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/pingpong.c
Expand Up @@ -366,9 +366,11 @@ CURLcode Curl_pp_readresp(struct Curl_easy *data,
else
Curl_dyn_reset(&pp->recvbuf);
}
else
else {
/* without a newline, there is no overflow */
pp->overflow = 0;
break;
}

} while(1); /* while there's buffer left to scan */

Expand Down Expand Up @@ -424,7 +426,7 @@ CURLcode Curl_pp_disconnect(struct pingpong *pp)

bool Curl_pp_moredata(struct pingpong *pp)
{
return (!pp->sendleft && pp->overflow);
return (!pp->sendleft && Curl_dyn_len(&pp->recvbuf));
}

#endif

0 comments on commit 002d24a

Please sign in to comment.