mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +01:00
BugFix: Network can not handle EPIPE error. Issue#35 #36
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -184,9 +184,10 @@ int MQTTGWPacket::recv(Network* network)
|
||||
unsigned char c;
|
||||
|
||||
/* read First Byte of Packet */
|
||||
if (network->recv((unsigned char*)&_header.byte, 1) == -1)
|
||||
int rc = network->recv((unsigned char*)&_header.byte, 1);
|
||||
if ( rc <= 0)
|
||||
{
|
||||
return -1;
|
||||
return rc;
|
||||
}
|
||||
/* read RemainingLength */
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user