summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-05-11 12:05:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-11 12:05:14 +0200
commit5d6224c769f8c154d0e8b79469607ee6973ba5c0 (patch)
treef539f41bc940c6bf2bcebaa939cd9d61bab33346
parent946c21042d7a841eb605956010360af0a943796b (diff)
downloadcurl-5d6224c769f8c154d0e8b79469607ee6973ba5c0.tar.gz
http2: don't signal settings change for same values
-rw-r--r--lib/http2.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 40d3123e2..719ead430 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -298,6 +298,8 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
}
break;
case NGHTTP2_SETTINGS:
+ {
+ uint32_t max_conn = httpc->settings.max_concurrent_streams;
DEBUGF(infof(conn->data, "Got SETTINGS for stream %x!\n", stream_id));
httpc->settings.max_concurrent_streams =
nghttp2_session_get_remote_settings(
@@ -309,10 +311,14 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
httpc->settings.max_concurrent_streams));
DEBUGF(infof(conn->data, "ENABLE_PUSH == %s\n",
httpc->settings.enable_push?"TRUE":"false"));
- infof(conn->data,
- "Connection state changed (MAX_CONCURRENT_STREAMS updated)!\n");
- Curl_multi_connchanged(conn->data->multi);
- break;
+ if(max_conn != httpc->settings.max_concurrent_streams) {
+ /* only signal change if the value actually changed */
+ infof(conn->data,
+ "Connection state changed (MAX_CONCURRENT_STREAMS updated)!\n");
+ Curl_multi_connchanged(conn->data->multi);
+ }
+ }
+ break;
default:
DEBUGF(infof(conn->data, "Got frame type %x for stream %x!\n",
frame->hd.type, stream_id));