Skip to content

Commit 466ea95

Browse files
luffykesh256dpi
authored andcommitted
error status moved before return
1 parent c63a6fc commit 466ea95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MQTTClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ bool MQTTClient::connect(const char clientId[], const char username[], const cha
272272
if (!skip) {
273273
int ret = this->netClient->connect(this->hostname, (uint16_t)this->port);
274274
if (ret <= 0) {
275-
return false;
276275
this->_lastError = LWMQTT_NETWORK_FAILED_CONNECT;
276+
return false;
277277
}
278278
}
279279

0 commit comments

Comments
 (0)