Nick Peng 2 дней назад
Родитель
Сommit
6156dd8d2c
2 измененных файлов с 5 добавлено и 2 удалено
  1. 3 1
      src/dns_client/client_http2.c
  2. 2 1
      src/http_parse/http2.c

+ 3 - 1
src/dns_client/client_http2.c

@@ -64,7 +64,9 @@ static int _dns_client_send_http2_stream(struct dns_server_info *server_info, st
 	/* Create HTTP/2 stream */
 	http2_stream = http2_stream_new(http2_ctx);
 	if (http2_stream == NULL) {
-		tlog(TLOG_WARN, "create http2 stream failed");
+		if (errno != ENOSPC) {
+			tlog(TLOG_WARN, "create http2 stream failed");
+		}
 		http2_ctx_put(http2_ctx);
 		return -1;
 	}

+ 2 - 1
src/http_parse/http2.c

@@ -614,7 +614,8 @@ static struct http2_stream *_http2_create_stream(struct http2_ctx *ctx, uint32_t
 {
 	/* Check concurrent streams limit */
 	if (ctx->active_streams >= ctx->settings.max_concurrent_streams && ctx->settings.max_concurrent_streams > 0) {
-		tlog(TLOG_WARN, "HTTP/2: Max concurrent streams limit reached (%d)", ctx->settings.max_concurrent_streams);
+		tlog(TLOG_DEBUG, "HTTP/2: Max concurrent streams limit reached (%d)", ctx->settings.max_concurrent_streams);
+		errno = ENOSPC;
 		return NULL;
 	}