correct handling of dns fauilure

In case of domain name resolution error result can be negative (see Dns.cpp:46)
This commit is contained in:
Sergey Konyukhovskiy 2015-12-04 04:10:18 +03:00
parent 0bb4efcea5
commit 830f34c7d0

View File

@ -122,7 +122,7 @@ boolean PubSubClient::connect(const char *id, const char *user, const char *pass
} else {
result = _client->connect(this->ip, this->port);
}
if (result) {
if (result == 1) {
nextMsgId = 1;
// Leave room in the buffer for header and variable length field
uint16_t length = 5;