Skip to content

Commit 508bfe1

Browse files
committed
Misc
1 parent c23e6a4 commit 508bfe1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ModbusIP_ESP8266.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void ModbusIP::begin() {
3030
//#endif
3131
void ModbusIP::task() {
3232
#ifdef TCP_KEEP_ALIVE
33-
if (!client || !client.connected()) {
33+
if (client == NULL || !client.connected()) {
3434
// if (client)
3535
// delete client;
3636
//
@@ -84,7 +84,7 @@ void ModbusIP::task() {
8484

8585
client.write(sbuf, send_len);
8686
}
87-
#ifndef TCP_KEEPALIVE
87+
#ifndef TCP_KEEP_ALIVE
8888
client.stop();
8989
#endif
9090
free(_frame);

0 commit comments

Comments
 (0)