Skip to content
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

How to tear down connections when going to background? #3

Open
HT-Stephen opened this issue Aug 25, 2014 · 3 comments
Open

How to tear down connections when going to background? #3

HT-Stephen opened this issue Aug 25, 2014 · 3 comments

Comments

@HT-Stephen
Copy link

Trying to use this as is but are having a little trouble handling backgrounding on iOS. The problem with iOS is that it can sometimes randomly connect to a different wifi network when coming out of background. Because of this any existing rabbitMQ connections that it had can become invalid or break.

What I'm trying to do is close everything down, close the consumer and connection on background, and then restart it upon resume. I see that this has significant improvements concerning teardown but I'm having trouble with the actual implementation.

Thank you in advance!

@pinipints
Copy link

Hi, were you able to achieve this?
I was able to close the channel but connection continues to remain open

@HT-Stephen
Copy link
Author

I will post the changes to the wrapper I made to my github repo sometime later today. The way I had it work was by enabling some of the commented out connection checker code and defaulting to "failing fast". I would rather have it assume it's down and just reestablish a connection immediately than have it sit there waiting for minutes on end.

@pinipints
Copy link

Thanks.. waiting for you to publish the details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants