Skip to content

Commit 574c3cc

Browse files
committed
Fix timeout issue
Fix timeout issue during TCP connection.
1 parent 16246c5 commit 574c3cc

File tree

4 files changed

+1
-5
lines changed

4 files changed

+1
-5
lines changed

arduino-modbus-rtu-tcp-gateway/02-modbus-tcp.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ void recvTcp()
133133
client.write(lowByte(crc)); // send CRC, low byte first
134134
client.write(highByte(crc));
135135
}
136-
client.stop();
137136
ethTxCount += 5;
138137
if (!localConfig.enableRtuOverTcp) ethTxCount += 4;
139138
}

arduino-modbus-rtu-tcp-gateway/03-modbus-rtu.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ void recvSerial()
112112
client.write(MBAP, 6);
113113
client.write(serialIn, rxNdx - 2); //send without CRC
114114
}
115-
client.stop();
116115
ethTxCount += rxNdx;
117116
if (!localConfig.enableRtuOverTcp) ethTxCount += 4;
118117
}
@@ -161,7 +160,6 @@ void recvSerial()
161160
client.write(lowByte(crc)); // send CRC, low byte first
162161
client.write(highByte(crc));
163162
}
164-
client.stop();
165163
ethTxCount += 5;
166164
if (!localConfig.enableRtuOverTcp) ethTxCount += 4;
167165
}

arduino-modbus-rtu-tcp-gateway/04-webserver.ino

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ void recvWeb()
144144
send204(client); // if you don't have a favicon, send 204
145145
else // if the page is unknown, HTTP response code 404
146146
send404(client);
147-
client.stop();
148147
action = NONE;
149148
dbg(F("[web] Stop client "));
150149
}

arduino-modbus-rtu-tcp-gateway/05-pages.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ void send404(EthernetClient &client)
564564
client.println(F("HTTP/1.0 404 Not Found"));
565565
client.println(F("Content-Type: text/plain")); // simple plain text without html tags
566566
client.println();
567-
client.println(F("File Fot Found"));
567+
client.println(F("File Not Found"));
568568
}
569569

570570

0 commit comments

Comments
 (0)