* receiving 0 byte pending packages aswell, some may come from appiot
This commit is contained in:
parent
ab58b96f08
commit
10922666b3
@ -106,8 +106,11 @@ void ArduinoClient::doWorkStep() {
|
||||
// wait for socket event
|
||||
SerialUSB.println(F("parsePacket()"));
|
||||
size_t pending = data.nbIOT->socketBytesPending(data.sock);
|
||||
if (pending > 0) {
|
||||
if (pending >= 0) {
|
||||
size_t numBytes = data.nbIOT->socketReceive(data.sock, packetBuffer, pending);
|
||||
if (pending == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
connection_t * connP;
|
||||
connP = connection_find(data.connList, data.sock);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user