File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ class MqttClient : public Client {
6767 // from Client
6868 virtual int connect (IPAddress ip, uint16_t port = 1883 );
6969 virtual int connect (const char *host, uint16_t port = 1883 );
70- virtual int connect (const IPAddress& ip, uint16_t port) { }; /* ESP8266 core defines this pure virtual in Client.h */
70+ #ifdef ESP8266
71+ virtual int connect (const IPAddress& ip, uint16_t port) { return connect (ip, port); }; /* ESP8266 core defines this pure virtual in Client.h */
72+ #endif
7173 virtual size_t write (uint8_t );
7274 virtual size_t write (const uint8_t *buf, size_t size);
7375 virtual int available ();
@@ -92,9 +94,10 @@ class MqttClient : public Client {
9294
9395 int connectError () const ;
9496 int subscribeQoS () const ;
95- virtual bool flush (unsigned int maxWaitMs) { } /* ESP8266 core defines this pure virtual in Client.h */
96-
97- virtual bool stop (unsigned int maxWaitMs) { } /* ESP8266 core defines this pure virtual in Client.h */
97+ #ifdef ESP8266
98+ virtual bool flush (unsigned int /* maxWaitMs*/ ) { flush (); return true ; } /* ESP8266 core defines this pure virtual in Client.h */
99+ virtual bool stop (unsigned int /* maxWaitMs*/ ) { stop (); return true ; } /* ESP8266 core defines this pure virtual in Client.h */
100+ #endif
98101
99102private:
100103 int connect (IPAddress ip, const char * host, uint16_t port);
You can’t perform that action at this time.
0 commit comments