-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nanocoap_sock: only re-transmit CON messages #18819
Conversation
Murdock results✔️ PASSED 782910a nanocoap_sock: only re-transmit CON messages
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
f6a9953
to
30ed25f
Compare
If a NON confirmable message is sent with a callback function, not receiving a response in time would lead to a retransmission. This is of course an error, as only CON messages are to be retransmitted.
30ed25f
to
782910a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with BOARD=native make -C tests/nanocoap_cli all term
/ put_non coap://[2001:db8::1]/ hello
before-after, largely LGTM with one note:
This sets the application timeout (which on this API is fixed to whatever nanocoap decides) to the time it'd take for the first CON transmission to be sent. That's probably not too bad if the times are all configured well (with ACK_TIMEOUT larger than a typical RTT), but if RTTs do exceed ACK_TIMEOUT, responses get lost.
For comparison -- not that I'd be particularly convinced it's the best thing to do --, gcoap keeps waiting for as long as it'd wait for CONs if it retransmitted (at least when waiting for separate responses, which is a different thing, but still comparable; I don't know off my head what it does for NONs).
What's coded there is an OK choice, I just want to be sure it's understood that that choice is being made here.
Thank you for the review! |
Contribution description
If a NON confirmable message is sent with a callback function, not receiving a response in time would lead to a retransmission.
This is of course an error, as only CON messages are to be retransmitted.
Testing procedure
Issues/PRs references