-
Notifications
You must be signed in to change notification settings - Fork 63
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
Error in "session_destroy" in eh_sender_with_sas_token_sample #195
Comments
CBS uses 2 links (a sender link and a receiver link) to have a message request/response pattern which is then used to execute basic RPCs like put_token. The working draft for CBS is here: https://lists.oasis-open.org/archives/amqp/201307/msg00002/amqp-cbs-v1.0-wd01_2013-07-08.pdf Note that it has never been ratified, but since it is used in MS Azure services (EH, SB, IotHub), it is provided with uAMQP. The 2 links I mentioned are created in the context of a session. I hope this helps understanding it. Basically the error you see is because the session layer gets destroyed before the CBS object that relies on it. It seems the sample is missing a cbs_destroy call, which should cleanly destroy the CBS layer before the session is destroyed in order to not display any error. Cheers, |
Thanks Dan for the reply. I actually tried to put cbs_destroy(cbs) before messagesender_destroy and it didn't work. I think also I tried to put it before session_destroy(session) and the same error appeared but I am not so sure so I will try it tomorrow and give you the feedback. |
I tried it after link_destroy but the same error comes up! |
Hi @ahmedawad1 I was able to repro this and indeed after adding the cbs_destroy the print with the error is still hit. So it will treat this as an error and report it. I can see there would be some cases where the user application wants to know that it was a close initiated by the user application. I hope this helps you, |
Marking this as an enhancement to add a disconnect callback to CBS. |
Hi,
I tested "eh_sender_with_sas_token_sample" in samples and it is working fine and it sends to the Eventhub except when session_destroy(session) is executed, then the call back function "on_cbs_error" is executed and shows CBS error.
Please what is the reason for this error? I cannot understand it.
The text was updated successfully, but these errors were encountered: