cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] Break if is_empty_data is true at the end of the while loop

From: Tatsuhiro Tsujikawa <tatsuhiro.t_at_gmail.com>
Date: Sat, 2 Aug 2014 00:51:02 +0900

This patch adds break statement if is_empty_data is true at the end of
while loop in readwrite_data.
Without this break statement, CPU usage goes to 100% if HTTP/2 transfer is
interrupted (RST_STREAM) and its recv function keeps return 0.

I'm not really sure this patch does the right thing.
Fro the code comment,
"""
      /* if we received nothing, the server closed the connection and we
         are done */
"""
it is quite safe to just break there.

Best regards,
Tatsuhiro Tsujikawa

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2014-08-01