Skip to content

Commit

Permalink
Remove debug log that can be problematic for non-blocking transport i…
Browse files Browse the repository at this point in the history
…mplementations (#167)

The debug-level log that is printed on not receiving any data from the network (when the first byte of an MQTT packet is attempted for reading) can be problematic when the transport interface TransportInterfaceRecv_t function is implemented in non-blocking behavior.

The problem it will cause is overwhelming logging of the message when MQTT_ProcessLoop API is called with a non-zero timeout (or the API is called multiple times with zero timeout but within a loop until some data is achieved). Due to over-logging of this message, the DEBUG logging level configured build of the coreMQTT library will be non-valuable.

This PR removes the problematic log statement.
  • Loading branch information
aggarw13 authored Jul 16, 2021
1 parent 8786f32 commit a108af5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion source/core_mqtt_serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2390,7 +2390,6 @@ MQTTStatus_t MQTT_GetIncomingPacketTypeAndLength( TransportRecv_t readFunc,
}
else if( ( status != MQTTBadParameter ) && ( bytesReceived == 0 ) )
{
LogDebug( ( "No data was received from the transport." ) );
status = MQTTNoDataAvailable;
}

Expand Down

0 comments on commit a108af5

Please sign in to comment.