Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Jul 19, 2023
1 parent e73d5e9 commit 12a7145
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/mqtt/MqttClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ namespace Aws
(void)data;

auto connWrapper = reinterpret_cast<MqttConnection *>(userData);
AWS_LOGF_DEBUG(AWS_LS_MQTT_CLIENT, "calling s_onConnectionClosed: %p", userData);
if (connWrapper->OnConnectionClosed)
{
connWrapper->OnConnectionClosed(*connWrapper, nullptr);
Expand Down Expand Up @@ -106,6 +107,7 @@ namespace Aws

void MqttConnection::s_onDisconnect(aws_mqtt_client_connection *, void *userData)
{
AWS_LOGF_DEBUG(AWS_LS_MQTT_CLIENT, "calling s_onDisconnect: %p", userData);
auto connWrapper = reinterpret_cast<MqttConnection *>(userData);
if (connWrapper->OnDisconnect)
{
Expand Down Expand Up @@ -350,7 +352,8 @@ namespace Aws
if (*this)
{
// Get rid of the on_closed callback, because if we are destroying the connection we do not care.
// aws_mqtt_client_connection_set_connection_closed_handler(m_underlyingConnection, nullptr, nullptr);
// aws_mqtt_client_connection_set_connection_closed_handler(m_underlyingConnection, nullptr,
// nullptr);

aws_mqtt_client_connection_release(m_underlyingConnection);

Expand Down

0 comments on commit 12a7145

Please sign in to comment.