Open Ruudjhuu opened 5 years ago
This indeed looks like a bug. Your suggested fix seems reasonable to me, though it is probably better to call resetResponse()
instead. One alternative would be to put a readPacket()
in front of the loop (or turn it into a do/while
loop), to make sure readPacket()
is called at least once (which also resets the response).
when using this funciton, it works the first time and all the other times after, i get the same response.
my case: I send DN (Detect node) request as an atcommandrequest option. When no device should be found, the function spend ten seconds waiting and then returns no device found. Just as it should. However, when the function is called the second time, it receives the same response within 1 ms.
I added ggetResponse().reset(); between line 850 and 851 and it works now.