Description
As discussed on IRC. https://issues.apache.org/jira/browse/PROTON-677 (git commit 111568af for reference) reworked the fix to add an explicit pn_link_detach. However, pn_messenger_stop will call pn_link_close for all links regardless of expiry/ttl. Ideally it should pn_link_detach for receiver links with expiry_policy PN_EXPIRE_NEVER or timeout>0
Patch available at:
https://gist.github.com/dnwe/844d0b21ef9e757f584b