keith-cullen / FreeCoAP

An implementation of a CoAP client, a CoAP server and a HTTP/CoAP proxy with full DTLS support.
132 stars 38 forks source link

Modified deduplication to re-send piggybacked responses #23

Closed PalmaITEM closed 6 years ago

PalmaITEM commented 6 years ago

When a piggybacked message is lost, and a duplicate request arrives at the server, the server

SHOULD acknowledge each duplicate copy of a Confirmable message using the same Acknowledgement

I agree that section 4.5. from the RFC leaves this open to discussion, because of the SHOULD key word.

However, I feel that it's worth resending the ACK with the response, specially in the context of block-wise transfers.

Otherwise, without this modification, if a piggybacked response of a block is lost, then the entire block-wise transfer needs to be restarted because currently the server will only send an empty ACK, no response.

keith-cullen commented 6 years ago

This is already fixed in the master and tinydtls branches.