From 3011c675aa4f31eb83cbc13551a656ae691fbbd6 Mon Sep 17 00:00:00 2001 From: Ryan Carper Date: Fri, 7 Feb 2020 18:33:28 +0000 Subject: [PATCH] Fixing monitoring options being passed onto connection when invalid --- source/connection_manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/connection_manager.c b/source/connection_manager.c index 52732a863..2ec5b4e93 100644 --- a/source/connection_manager.c +++ b/source/connection_manager.c @@ -686,7 +686,10 @@ static int s_aws_http_connection_manager_new_connection(struct aws_http_connecti options.socket_options = &manager->socket_options; options.on_setup = s_aws_http_connection_manager_on_connection_setup; options.on_shutdown = s_aws_http_connection_manager_on_connection_shutdown; - options.monitoring_options = &manager->monitoring_options; + + if (aws_http_connection_monitoring_options_is_valid(&manager->monitoring_options)) { + options.monitoring_options = &manager->monitoring_options; + } struct aws_http_proxy_options proxy_options; AWS_ZERO_STRUCT(proxy_options);