[TinyMqtt.cpp] Fix misusing of WiFiClient class

This commit is contained in:
hsaturn
2023-04-17 00:43:20 +02:00
parent fd305d7b48
commit 25602ec2f5

View File

@@ -63,7 +63,7 @@ MqttClient::MqttClient(MqttBroker* local_broker, TcpClient* new_client)
// client->onConnect() TODO // client->onConnect() TODO
// client->onDisconnect() TODO // client->onDisconnect() TODO
#else #else
tcp_client = new WiFiClient(*new_client); tcp_client = new TcpClient(*new_client);
#endif #endif
#ifdef EPOXY_DUINO #ifdef EPOXY_DUINO
alive = millis()+500000; alive = millis()+500000;
@@ -211,7 +211,7 @@ void MqttBroker::onClient(void* broker_ptr, TcpClient* client)
void MqttBroker::loop() void MqttBroker::loop()
{ {
#ifndef TINY_MQTT_ASYNC #ifndef TINY_MQTT_ASYNC
WiFiClient client = server->accept(); TcpClient client = server->accept();
if (client) if (client)
{ {