Skip to content

Commit

Permalink
Merge branch 'main' into string_array
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin authored Aug 12, 2024
2 parents 0ee19c5 + 1ec6c54 commit f6b23e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/iot/Mqtt5Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ namespace Aws
m_options->WithConnectOptions(m_connectOptions);
}

bool proxyOptionsSet = false;

if (m_websocketConfig.has_value())
{
auto websocketConfig = m_websocketConfig.value();
Expand All @@ -595,13 +597,20 @@ namespace Aws
if (useWebsocketProxyOptions)
{
m_options->WithHttpProxyOptions(m_websocketConfig->ProxyOptions.value());
proxyOptionsSet = true;
}
else if (m_proxyOptions.has_value())
{
m_options->WithHttpProxyOptions(m_proxyOptions.value());
proxyOptionsSet = true;
}
}

if (m_proxyOptions.has_value() && !proxyOptionsSet)
{
m_options->WithHttpProxyOptions(m_proxyOptions.value());
}

return Crt::Mqtt5::Mqtt5Client::NewMqtt5Client(*m_options, m_allocator);
}

Expand Down

0 comments on commit f6b23e3

Please sign in to comment.