Skip to content

Commit 15041c4

Browse files
authored
bugfix release
Bugfix release
2 parents e0477d3 + 59b1297 commit 15041c4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"type": "git",
1515
"url": "https://github.com/bertmelis/espMqttClient.git"
1616
},
17-
"version": "1.4.0",
17+
"version": "1.4.1",
1818
"frameworks": "arduino",
1919
"platforms": ["espressif8266", "espressif32"],
2020
"headers": ["espMqttClient.h", "espMqttClientAsync.h"],

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=espMqttClient
2-
version=1.4.0
2+
version=1.4.1
33
author=Bert Melis
44
maintainer=Bert Melis
55
sentence=an MQTT client for the Arduino framework for ESP8266 / ESP32

src/MqttClient.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ MqttClient::MqttClient(espMqttClientTypes::UseInternalTask useInternalTask, uint
3030
, _clientId(nullptr)
3131
, _ip()
3232
, _host(nullptr)
33-
, _port(1183)
33+
, _port(1883)
3434
, _useIp(false)
3535
, _keepAlive(15000)
3636
, _cleanSession(true)
@@ -338,8 +338,6 @@ int MqttClient::_sendPacket() {
338338
EMC_SEMAPHORE_GIVE();
339339
return -1;
340340
}
341-
// handle with care! millis() returns unsigned 32 bit, token is void*
342-
static_assert(sizeof(uint32_t) <= sizeof(void*), "the size of uint32_t must be smaller than or equal to the size of a pointer");
343341
packet->timeSent = millis();
344342
_lastClientActivity = millis();
345343
_bytesSent += written;
@@ -464,6 +462,7 @@ void MqttClient::_checkPing() {
464462
}
465463

466464
void MqttClient::_checkTimeout() {
465+
EMC_SEMAPHORE_TAKE();
467466
espMqttClientInternals::Outbox<OutgoingPacket>::Iterator it = _outbox.front();
468467
// check that we're not busy sending
469468
// don't check when first item hasn't been sent yet
@@ -473,6 +472,7 @@ void MqttClient::_checkTimeout() {
473472
_outbox.resetCurrent();
474473
}
475474
}
475+
EMC_SEMAPHORE_GIVE();
476476
}
477477

478478
void MqttClient::_onConnack() {

0 commit comments

Comments
 (0)