[PubSubClient] Fix check for domain string

This commit is contained in:
TD-er
2019-11-13 13:07:00 +01:00
committed by Gijs Noorlander
parent 5707fb09a4
commit 59c6445eea
+1 -1
View File
@@ -127,7 +127,7 @@ boolean PubSubClient::connect(const char *id, const char *user, const char *pass
if (_client->connected()) {
result = 1;
} else {
if (domain != NULL) {
if (domain.length() != 0) {
result = _client->connect(this->domain.c_str(), this->port);
} else {
result = _client->connect(this->ip, this->port);