-
Notifications
You must be signed in to change notification settings - Fork 104
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
send_message on wamp_session::process_goodbye throws always #224
Comments
Does setting the session id to zero has to be done in process_goodbye (line 834) ? For me it looks like setting the id to zero at that point should not be done, since we only want to reply to a goodbye message from the peer, or do nothing in case we called leave. |
I think at least is clear that it should not be set to 0 before send_message as it will just always throw. |
that sounds like a bug: obviously, to send a goodbye or reply to one, the session ID is still needed. it should be zero'ed only after that. it should be zero'ed, since that signals "no session currently attached". after replying to a goodbye with a goodbye, no further message must be sent. when sending a goodbye in the first place (active leave), a response is expected but no additional message must be sent. IOW: goodbye is always the last message sent on a session. |
Additionally, all other send_message calls are wrapped on try-catch, but the ones in process_goodbye and process_invocation. Also setting session id to 0, signals "internally" that no more messages should be sent. But for the user of the session, there is no inmediate notification about it. Caller of session would also need to get such information ASAP. |
yes, absolutely: the "on-leave" should fire, and allow user code to react |
with:
this results into throwing no_session_error() that will be uncaught and crash the application
The text was updated successfully, but these errors were encountered: