net.c: Handle duplicate empty ACK

An empty response ACK is ignored if there was a request on the Send-Q.

However if there was a subsequent duplicate ACK this would then fall through
to the general handling logic in coap_dispatch(), and would trigger the ping
handler (if set) and send a RST (if not mcast) which is not correct.

Correct a change added in by #554 so that all empty response ACKs are ignored.
This commit is contained in:
Jon Shallow committed 2021-03-31 12:56:03 +01:00
1 parent 4cab59dbbf
commit bdeeae9c04
1 file changed
+1 -1
+1 -1
View File
@@ -2926,7 +2926,7 @@ coap_dispatch(coap_context_t *context, coap_session_t *session,
coap_touch_observer(context, sent->session, &token);
}
if (pdu->code == 0 && sent) {
if (pdu->code == 0) {
/* an empty ACK needs no further handling */
goto cleanup;
}