Skip to content

Commit de59cec

Browse files
committed
treat zero as an error
1 parent b929e01 commit de59cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MQTTClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class MQTTClient {
287287
this->network.client = this->netClient;
288288

289289
// connect to host
290-
if (this->netClient->connect(this->hostname, (uint16_t)this->port) < 0) {
290+
if (this->netClient->connect(this->hostname, (uint16_t)this->port) <= 0) {
291291
return false;
292292
}
293293

0 commit comments

Comments
 (0)