Fixed compile error when used with arduino-0016 or later

This commit is contained in:
Nicholas O'Leary 2009-07-24 15:44:30 +01:00
parent 0cd448ffa5
commit 265016844b
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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();
}