Skip to content

Commit

Permalink
Prevent printing debug message when not requested
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoutp committed Jan 28, 2018
1 parent 7783c06 commit 9d2c50b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mqtt_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ class MqttClient<E extends VirtualMqttConnection> {
_resetTimer();
}

print("[mqttClient] [" + m._topic + "][" + m._payload + "]");
if (debugMessage) {
print("[mqttClient] [" + m._topic + "][" + m._payload + "]");
}
// notify the client of the new topic / payload
if (_onSubscribeDataMap != null && _onSubscribeDataMap[m._topic] != null)
_onSubscribeDataMap[m._topic](m._topic, m._payload);
Expand Down

0 comments on commit 9d2c50b

Please sign in to comment.