Fixed compile error when used with arduino-0016 or later
This commit is contained in:
parent
0cd448ffa5
commit
265016844b
@ -1,3 +1,7 @@
|
||||
1.2
|
||||
* Fixed compile error when used with arduino-0016 or later
|
||||
|
||||
|
||||
1.1
|
||||
* Reduced size of library
|
||||
* Added support for Will messages
|
||||
|
@ -88,7 +88,7 @@ int PubSubClient::loop() {
|
||||
long t = millis();
|
||||
if (t - lastActivity > KEEPALIVE) {
|
||||
_client.write(192);
|
||||
_client.write(0);
|
||||
_client.write((uint8_t)0);
|
||||
lastActivity = t;
|
||||
}
|
||||
if (_client.available()) {
|
||||
@ -109,7 +109,7 @@ int PubSubClient::loop() {
|
||||
}
|
||||
} else if (type == 12) { // PINGREG
|
||||
_client.write(208);
|
||||
_client.write(0);
|
||||
_client.write((uint8_t)0);
|
||||
lastActivity = t;
|
||||
}
|
||||
}
|
||||
@ -163,7 +163,7 @@ void PubSubClient::subscribe(char* topic) {
|
||||
|
||||
void PubSubClient::disconnect() {
|
||||
_client.write(224);
|
||||
_client.write(0);
|
||||
_client.write((uint8_t)0);
|
||||
_client.stop();
|
||||
lastActivity = millis();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user