-
Notifications
You must be signed in to change notification settings - Fork 58
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
MqttService keep working even if subscription is cancelled #7
Comments
Hi @sargentin , We will investigate shutting down the service when the last subscription is cancelled. |
Ok thx ! |
Hello, |
I have the same problem. Is there a solution? |
Can I somehow help with the investigation on this issue? The status has not been changed for 3 month now. This is a blocking issue with a huge security issue. As the issue #25 has been closed I am adding some concerns here: A user is logged in via cognito user pools on one device and starts a subscription. Signs out. Signs in to another device and . In this scenario the first device is still receiving the subscription updates. It is not only about cancel the subscription on mqtt level when the last appsync subscription has been canceled, but always when a subscription is canceled on appsync level. As the subscriptions can be for different data types and therefore need authentication to be received by a client. At the moment I do not have control over cancelling the subscriptions at all. |
Hi @mllrmat , I understand your concern. The connections are not currently being terminated when the subscription is cancelled. They do released the callback and free the memory that the callback was holding onto. |
Sorry for the delay on this issue - we have identified a fix and are in the process of testing it. I am hoping to include it in the next rev of the SDK. Will post back here once I have confirmation. |
@mllrmat @dy08 @sargentin |
It shows it is not fixed. I test it by attaching button and just call " subscriptionWatcher.cancel(); " my log here: (look bolded text) |
Looking through the log you posted, here are my findings.
Can you provide some more context about your application, number of subscriptions, code snippets etc to help debug further? You can also look at this test where I setup 6 subscriptions and cancel them Line 237 in 7f8490c
|
Closing as there has been no response. Please feel free to open this item if you are still encountering issues. |
Hi,
When I cancel subscription on changing activity, why MqttService keep working with the following logs :
05-02 10:48:36.084 13552-3743 D/AlarmPingSender: Success. Release lock(MqttService.client.ndbexhommzflhkswq7nlvxysk4):1525250916084 05-02 10:48:38.562 13552-13552 D/AlarmPingSender: Sending Ping at:1525250918562 05-02 10:48:38.577 13552-13552 D/AlarmPingSender: Schedule next alarm at 1525250923577 Alarm scheule using setExactAndAllowWhileIdle, next: 5000
Thx in advance for your answer.
The text was updated successfully, but these errors were encountered: