Skip to content

Commit

Permalink
Fixed port in url for MQTT service.
Browse files Browse the repository at this point in the history
  • Loading branch information
wsobel committed Apr 11, 2024
1 parent e6f9692 commit c85b3b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
set(AGENT_VERSION_MAJOR 2)
set(AGENT_VERSION_MINOR 3)
set(AGENT_VERSION_PATCH 0)
set(AGENT_VERSION_BUILD 6)
set(AGENT_VERSION_BUILD 7
)
set(AGENT_VERSION_RC "")

# This minimum version is to support Visual Studio 2019 and C++ feature checking and FetchContent
Expand Down
1 change: 1 addition & 0 deletions src/mtconnect/mqtt/mqtt_client_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ namespace mtconnect {
m_connected = false;
if (m_handler && m_handler->m_disconnected)
m_handler->m_disconnected(shared_from_this());
m_handler->m_disconnected(shared_from_this());
if (m_running)
{
reconnect();
Expand Down
11 changes: 3 additions & 8 deletions src/mtconnect/source/adapter/mqtt/mqtt_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ namespace mtconnect {
{
m_options[configuration::MqttHost] = m_options[configuration::Host];
}
if (!HasOption(m_options, configuration::MqttPort) &&
HasOption(m_options, configuration::Port))
{
m_options[configuration::MqttPort] = m_options[configuration::Port];
}
else
if (!HasOption(m_options, configuration::MqttPort))
{
m_options[configuration::MqttPort] = 1883;
}
Expand Down Expand Up @@ -123,7 +118,7 @@ namespace mtconnect {
!IsOptionSet(m_options, configuration::MqttWs))
{
m_client = make_shared<mtconnect::mqtt_client::MqttTlsClient>(m_ioContext, m_options,
move(clientHandler));
std::move(clientHandler));
}
else if (IsOptionSet(m_options, configuration::MqttWs) &&
IsOptionSet(m_options, configuration::MqttTls))
Expand All @@ -139,7 +134,7 @@ namespace mtconnect {
else
{
m_client = make_shared<mtconnect::mqtt_client::MqttTcpClient>(m_ioContext, m_options,
move(clientHandler));
std::move(clientHandler));
}

m_identity = m_client->getIdentity();
Expand Down

0 comments on commit c85b3b3

Please sign in to comment.