From 3ed5874373f9c5e48a3069bcfc768053522ac63a Mon Sep 17 00:00:00 2001 From: hsaturn Date: Fri, 2 Apr 2021 19:57:04 +0200 Subject: [PATCH] Fix compilation --- src/TinyMqtt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TinyMqtt.h b/src/TinyMqtt.h index 98d85f6..5385e61 100644 --- a/src/TinyMqtt.h +++ b/src/TinyMqtt.h @@ -131,6 +131,8 @@ class MqttClient bool connected() { return (parent!=nullptr and client==nullptr) or (client and client->connected()); } + void write(const char* buf, size_t length) + { if (client) client->write(buf, length); } const std::string& id() const { return clientId; } void id(std::string& new_id) { clientId = new_id; } @@ -176,8 +178,6 @@ class MqttClient private: MqttError sendTopic(const Topic& topic, MqttMessage::Type type, uint8_t qos); void resubscribe(); - void write(const char* buf, size_t length) - { if (client) client->write(buf, length); } friend class MqttBroker; MqttClient(MqttBroker* parent, WiFiClient& client);