mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 23:46:51 +01:00
BugFix BugFix of Issues #41
This commit is contained in:
@@ -119,7 +119,6 @@ void BrokerRecvTask::run(void)
|
|||||||
if ( rc > 0 )
|
if ( rc > 0 )
|
||||||
{
|
{
|
||||||
if ( log(client, packet) == -1 )
|
if ( log(client, packet) == -1 )
|
||||||
|
|
||||||
{
|
{
|
||||||
delete packet;
|
delete packet;
|
||||||
goto nextClient;
|
goto nextClient;
|
||||||
@@ -132,7 +131,13 @@ void BrokerRecvTask::run(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (rc == -1)
|
if ( rc == 0 )
|
||||||
|
{
|
||||||
|
client->getNetwork()->close();
|
||||||
|
delete packet;
|
||||||
|
goto nextClient;
|
||||||
|
}
|
||||||
|
else if (rc == -1)
|
||||||
{
|
{
|
||||||
WRITELOG("%s BrokerRecvTask can't receive a packet from the broker errno=%d %s%s\n", ERRMSG_HEADER, errno, client->getClientId(), ERRMSG_FOOTER);
|
WRITELOG("%s BrokerRecvTask can't receive a packet from the broker errno=%d %s%s\n", ERRMSG_HEADER, errno, client->getClientId(), ERRMSG_FOOTER);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user