and the content of the conf file matched with the sample program


Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2018-07-31 06:57:13 +09:00
parent 79f6aef8e4
commit e942ee451d
9 changed files with 29 additions and 15 deletions

View File

@@ -402,7 +402,6 @@ Client::Client(bool secure)
_connAck = 0;
_waitWillMsgFlg = false;
_sessionStatus = false;
_otaClient = 0;
_prevClient = 0;
_nextClient = 0;
_clientSleepPacketQue.setMaxSize(MAX_SAVED_PUBLISH);
@@ -570,7 +569,7 @@ void Client::setSessionStatus(bool status)
bool Client::erasable(void)
{
return _sessionStatus || !_hasPredefTopic;
return _sessionStatus && !_hasPredefTopic && _forwarder == 0;
}
void Client::updateStatus(MQTTSNPacket* packet)

View File

@@ -363,7 +363,6 @@ private:
Client* _nextClient;
Client* _prevClient;
Client* _otaClient;
};
/*=====================================

View File

@@ -227,7 +227,7 @@ void ClientProxy::resetPingTimer(void)
void ClientProxy::send(MQTTSNPacket* packet)
{
if ( packet->getType() == MQTTSN_CONNACK || packet->getType() == MQTTSN_PINGRESP )
if ( packet->getType() == MQTTSN_CONNACK )
{
resetPingTimer();
sendStoredPublish();
@@ -236,6 +236,10 @@ void ClientProxy::send(MQTTSNPacket* packet)
{
resetPingTimer();
}
else if ( packet->getType() == MQTTSN_DISCONNECT )
{
// blank
}
}
void ClientProxy::sendStoredPublish(void)