Skip to content
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

Retransmit when server is unreachable #418

Closed
al1img opened this issue Oct 31, 2019 · 2 comments
Closed

Retransmit when server is unreachable #418

al1img opened this issue Oct 31, 2019 · 2 comments

Comments

@al1img
Copy link

al1img commented Oct 31, 2019

libcoap release-4.2.0:

Simple client on linux sends GET message to the server. The server is down. After first attempt the client gets ICMP message: destination unreachable and disconnects the session. At next attempts the client doesn't send any message, just waits retransmission timeout.

Oct 31 20:04:39 DEBG ***[::1]:56216 <-> [::1]:5683 UDP : new outgoing session
Oct 31 20:04:39 DEBG *  [::1]:56216 <-> [::1]:5683 UDP : sent 83 bytes
Oct 31 20:04:39 DEBG ** [::1]:56216 <-> [::1]:5683 UDP : tid=29546 added to retransmit queue (2313ms)
Oct 31 20:04:39 WARN coap_network_read: unreachable
Oct 31 20:04:42 DEBG ** [::1]:56216 <-> [::1]:5683 UDP : tid=29546: retransmission #1
Oct 31 20:04:47 DEBG ** [::1]:56216 <-> [::1]:5683 UDP : tid=29546: retransmission #2
Oct 31 20:04:57 DEBG ** [::1]:56216 <-> [::1]:5683 UDP : tid=29546: retransmission #3
Oct 31 20:05:16 DEBG ** [::1]:56216 <-> [::1]:5683 UDP : tid=29546: retransmission #4
Oct 31 20:05:54 DEBG ** [::1]:56216 <-> [::1]:5683 UDP : tid=29546: give up after 4 attempts

Issue 1: It is not obvious that the session is closed at this case. And for new transmit the session should be reopened. Is there any callback to notify the client that the session is closed?

Issue 2: If the server becomes available between next retransmissions (for example between #2and #3), the message is failed because the session is closed and attempt #3 and following don't actually send pdu.

@mrdeep1
Copy link
Collaborator

mrdeep1 commented Nov 1, 2019

@al1img This should be fixed by #356 (for the PDU re-transmission) and #357 (for the callback), both of which are in the develop branch.

Please check with the develop version that this is no longer an issue for you.

@al1img
Copy link
Author

al1img commented Nov 1, 2019

@mrdeep1 Thanks for pointing me out. I confirm that the issues are resolved in the develop branch.
The issue can be closed.

@al1img al1img closed this as completed Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants