This commit is contained in:
MichaelDvP
2026-01-07 08:38:01 +01:00
44 changed files with 800 additions and 451 deletions

View File

@@ -52,7 +52,7 @@ ModbusClientTCPasync::~ModbusClientTCPasync() {
}
}
// force close client
MTA_client.close(true);
MTA_client.close();
}
// optionally manually connect to modbus server. Otherwise connection will be made upon first request
@@ -79,7 +79,7 @@ void ModbusClientTCPasync::connect(IPAddress host, uint16_t port) {
// manually disconnect from modbus server. Connection will also auto close after idle time
void ModbusClientTCPasync::disconnect(bool force) {
LOG_D("disconnecting\n");
MTA_client.close(force);
MTA_client.close();
}
// Set timeout value

View File

@@ -253,7 +253,7 @@ void ModbusServerTCPasync::onClientConnect(AsyncClient* client) {
LOG_D("nr clients: %u\n", clients.size());
} else {
LOG_D("max number of clients reached, closing new\n");
client->close(true);
client->close();
delete client;
}
}

View File

@@ -42,7 +42,7 @@ int ClientAsync::read(uint8_t* buf, size_t size) {
}
void ClientAsync::stop() {
client.close(false);
client.close();
}
bool ClientAsync::connected() {