Merge pull request #495 from flok99/patch-1

Update PubSubClient.cpp
This commit is contained in:
Nick O'Leary
2018-11-01 23:28:22 +00:00
committed by GitHub

View File

@ -561,6 +561,7 @@ void PubSubClient::disconnect() {
buffer[1] = 0;
_client->write(buffer,2);
_state = MQTT_DISCONNECTED;
_client->flush();
_client->stop();
lastInActivity = lastOutActivity = millis();
}