WrathChaos/StompClientLib

invalidate reconnect

DavidTomic opened this issue · 5 comments

Hi,

Is there a way to invalidate reconnect?

If a user e.g. performs logout than reconnect should stop.

Hello @DavidTomic,
Business logic is all up to you. Library itself does not have any business logic to reconnect or even connect. If you do not want to auto re-connect. Then you just do not need to use "reconnect" function and you can write your own re-connect business logic :) OR you can use the "reconnect" function but still you need to write your own business logic to check user is already logout, or there is a still alive activity. If you cannot make it, please re-open the issue and let's discuss this :)
Have fun!

Hi,

reconnect feature provided in this lib is good to have because the user can lose internet connection etc. and once back it will auto-reconnect.

But once reconnect is fired there is no way to stop it, even If I explicitly call disconnect.

I think it is a good feature to have stop reconnect feature because of use case I mentioned in above post.

I'll fork this lib and make stop reconnect feature.

Let me know If you want me to make a pull request for this, thank you.

And thank you for this great lib.

Hello @DavidTomic,
You can always make a PR :) I would love that. If you're working on it, please let me know.
I really love to add this feature with PR :)
Thank you for using this lib. Really glad to hear that.

@WrathChaos
Hi, I implemented this in my project, I will make PR asap.

@DavidTomic
Hi again, thank you so much. Waiting for the PR :O