Skip to content

Commit

Permalink
correct handling of dns fauilure
Browse files Browse the repository at this point in the history
In case of domain name resolution error result can be negative (see Dns.cpp:46)
  • Loading branch information
ElvisTheKing committed Dec 4, 2015
1 parent 0bb4efc commit 830f34c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PubSubClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 830f34c

Please sign in to comment.