-
Notifications
You must be signed in to change notification settings - Fork 534
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
No way of retrieving the SessionPresent flag after an autoreconnection #582
Comments
As you say I'd be reluctant to change the definition of I think that the approach mentioned here might provide what you want? This would effectively replace the |
Your approach is interesting, thanks. I think the session present flag could be exposed in the |
@Annopaolo - it was a suggestion on how this could be accomplished in a way that would have minimal impact on the client; not a commitment to implement it myself (it's not something I'll use and I'm fairly busy currently). The implementation should be fairly simple (I'd probably add a My concern is that we have a number of requests for callbacks that are only of use in very specific circumstances (including yours!). Given that we already have a lot of |
As described in #240, the session present flag exposed by the ConnAck packet can be used to perform some optimization, and in our specific usecase is part of the protocol itself).
Currently, Paho exposes the flag when performing the first connection, but it does not allow to access it during reconnections.
We're currently using our fork which exposes the flag in
OnConnectHandler
(breaking the current API for the callback).If it's fine for you we can submit a pull request with the above mentioned implementation or, if you don't want to break the API and you identify an alternative way to expose the flag during the reconnection, let us know so we can provide a different one.
The text was updated successfully, but these errors were encountered: