File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3825,8 +3825,9 @@ struct aws_mqtt5_client_options_storage *aws_mqtt5_client_options_storage_new(
38253825 }
38263826
38273827 if (options -> http_proxy_options != NULL ) {
3828+ /* Ignore a specified proxy connection type and use TUNNEL unconditionally as only this proxy type works. */
38283829 options_storage -> http_proxy_config =
3829- aws_http_proxy_config_new_from_proxy_options (allocator , options -> http_proxy_options );
3830+ aws_http_proxy_config_new_tunneling_from_proxy_options (allocator , options -> http_proxy_options );
38303831 if (options_storage -> http_proxy_config == NULL ) {
38313832 goto error ;
38323833 }
Original file line number Diff line number Diff line change @@ -3340,7 +3340,20 @@ static int s_mqtt5_client_options_set_invalid_proxy_fn(struct aws_allocator *all
33403340 struct aws_mqtt5_client_options_storage * client_options_storage =
33413341 aws_mqtt5_client_options_storage_new (allocator , & client_options );
33423342
3343- ASSERT_NULL (client_options_storage );
3343+ /* Even though the provided proxy connection type is unsupported, MQTT5 client should ignore it and be initialized
3344+ * with TUNNEL. */
3345+ ASSERT_INT_EQUALS (AWS_HPCT_HTTP_TUNNEL , client_options_storage -> http_proxy_options .connection_type );
3346+
3347+ ASSERT_INT_EQUALS (
3348+ AWS_MQTT5_DEFAULT_SOCKET_CONNECT_TIMEOUT_MS , client_options_storage -> socket_options .connect_timeout_ms );
3349+ ASSERT_INT_EQUALS (AWS_MQTT5_CLIENT_DEFAULT_MIN_RECONNECT_DELAY_MS , client_options_storage -> min_reconnect_delay_ms );
3350+ ASSERT_INT_EQUALS (AWS_MQTT5_CLIENT_DEFAULT_MAX_RECONNECT_DELAY_MS , client_options_storage -> max_reconnect_delay_ms );
3351+ ASSERT_INT_EQUALS (
3352+ AWS_MQTT5_CLIENT_DEFAULT_MIN_CONNECTED_TIME_TO_RESET_RECONNECT_DELAY_MS ,
3353+ client_options_storage -> min_connected_time_to_reset_reconnect_delay_ms );
3354+ ASSERT_INT_EQUALS (AWS_MQTT5_CLIENT_DEFAULT_PING_TIMEOUT_MS , client_options_storage -> ping_timeout_ms );
3355+ ASSERT_INT_EQUALS (AWS_MQTT5_CLIENT_DEFAULT_CONNACK_TIMEOUT_MS , client_options_storage -> connack_timeout_ms );
3356+ ASSERT_INT_EQUALS (AWS_MQTT5_CLIENT_DEFAULT_OPERATION_TIMEOUNT_SECONDS , client_options_storage -> ack_timeout_seconds );
33443357
33453358 aws_mqtt5_client_options_storage_destroy (client_options_storage );
33463359 aws_client_bootstrap_release (bootstrap );
You can’t perform that action at this time.
0 commit comments