Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 383a2ca

Browse filesBrowse files
committed
Reset last RX to mills() after client connect
1 parent 1292b8c commit 383a2ca
Copy full SHA for 383a2ca

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎src/MqttClient.cpp

Copy file name to clipboardExpand all lines: src/MqttClient.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,6 @@ int MqttClient::connect(IPAddress ip, const char* host, uint16_t port)
785785
_rxState = MQTT_CLIENT_RX_STATE_READ_TYPE;
786786
_connected = false;
787787
_txPacketId = 0x0000;
788-
_lastRx = 0;
789788

790789
if (host) {
791790
if (!_client->connect(host, port)) {
@@ -799,6 +798,8 @@ int MqttClient::connect(IPAddress ip, const char* host, uint16_t port)
799798
}
800799
}
801800

801+
_lastRx = millis();
802+
802803
String id = _id;
803804
int idLength = id.length();
804805
int usernameLength = _username.length();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.