Fix compilation in DEBUG mode

This commit is contained in:
hsaturn
2021-04-10 16:51:35 +02:00
parent d96143f185
commit afc9370e3e
2 changed files with 3 additions and 2 deletions

View File

@@ -139,7 +139,7 @@ void MqttBroker::onClient(void* broker_ptr, AsyncClient* client)
MqttBroker* broker = static_cast<MqttBroker*>(broker_ptr); MqttBroker* broker = static_cast<MqttBroker*>(broker_ptr);
broker->addClient(new MqttClient(broker, client)); broker->addClient(new MqttClient(broker, client));
debug("New client #" << broker->clients->size()); debug("New client #" << broker->clients.size());
} }
void MqttBroker::loop() void MqttBroker::loop()

View File

@@ -1,5 +1,4 @@
#pragma once #pragma once
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h> #include <ESPAsyncTCP.h>
#include <vector> #include <vector>
#include <set> #include <set>
@@ -7,6 +6,8 @@
#include "StringIndexer.h" #include "StringIndexer.h"
#include <MqttStreaming.h> #include <MqttStreaming.h>
// #define TINY_MQTT_DEBUG
#ifdef TINY_MQTT_DEBUG #ifdef TINY_MQTT_DEBUG
#define debug(what) { Serial << __LINE__ << ' ' << what << endl; delay(100); } #define debug(what) { Serial << __LINE__ << ' ' << what << endl; delay(100); }
#else #else