-
Notifications
You must be signed in to change notification settings - Fork 54
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
Client connections when internet lost #96
Comments
Thanks for your report! There's a built-in solution for automatic re-connecting, as you have seen. Not sure if that plays well with your (additional) custom mechanism for the re-connects. What do you think? Could you disable one of the two solutions? What about the internal solution only? Does it work or is there anything wrong with it so that you had to create a custom solution? |
Is this what you mean? But as far as I see what would happen when it have exceded the max amount? |
but even if I do the approach I wrote in the last post, when I try to reconnect on the second time it will be keep the last connection making 2 client when reconnecting or 3 clients if it happens again. that's why I refer when I say that I found an issue or in other words a bug... |
Yes, the issue that you referenced does list what has to be improved. But nevertheless, the automatic re-connect should work today. Using the connectivity state to make re-connects more efficient is a good idea. Let's track the progress of this issue here: #98 Can you try the built-in mechanism for re-connects and (temporarily) disable your own implementation? What's wrong with the built-in solution? Yes, there may be some issues that we have to fix, but what's preventing it from working for you today, specifically? |
The built-in reconnections works just fine ( just for those fast reconnections). My poor implementation (of reconnections) right know is just to avoid doing the broadcast receiver (just to run some tests fast). I implemented a simple solution, which as far as I see it's preventing from doing a lot of clients. |
@mwaclawek any idea? about the subscriptions |
It seems your pull request #99 solved the problem of too many clients connected to the server for you, right? Before, there was one client and after it re-connected there were two clients. Now there is one client and after re-connecting, the old one goes away so that there is still only one client. Is this correct? If it is, we have fixed this problem. Then there seems to be another problem, i.e. subcriptions not sending any data after a re-connect. Is this correct as well? The most important question is: Do the subscriptions stop working after re-connects only with your pull request #99 added to the code or does this happen after re-connects with the current stable version of this library as well? |
I am facing same issue. Can anybody help me to solve this please ? |
Hi there, I have found an issue.
I am trying to handle all my internet connections handlers, reconnections and disconnections. The meteor handlers works just find OnDiscconnected and onException etc.
My approach right now to reconnect once the internet is back (without having a broadcast from android telling me the internet state). Is the next one:
@Override public void onDisconnect() { Log.e("gotDisconnected","well..."); mMeteor.reconnect(); }
and it works well, it gets reconnect but the problem is that all web sockets that tried to connect while the internet was off are getting connected.
first I saw at my galaxy dashboard that my server was getting 100+ clients when I'm the only one running tests. Then on my log I found a lot of exceptions after my internet was reestablished.
and after I force quit it this displayed at Log:
a lot of times btw
The text was updated successfully, but these errors were encountered: