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

Meteor reconnects and updates db in recursion #114

Closed
maximsushkevich opened this issue Oct 5, 2016 · 4 comments
Closed

Meteor reconnects and updates db in recursion #114

maximsushkevich opened this issue Oct 5, 2016 · 4 comments
Labels

Comments

@maximsushkevich
Copy link

Hi there!

I found the very strange behavior.
Meteor rewrites local db in recursion.

Investigating this issue I have found in log following lines:

Meteor
   onClose

ddp lib prints this lines onDisconnected.

Looks like meteor connects, updates local db, disconnects then connects again, updates local db, again disconnects ...

Did anybody meet the problem such this?
Could be problem in socket library?

Since I work with wss, I have replaced https://github.com/ngauthier/tubesock with https://github.com/TakahikoKawasaki/nv-websocket-client.

Thank you!

@ocram ocram added the question label Oct 7, 2016
@ocram
Copy link
Contributor

ocram commented Oct 7, 2016

Thanks for your report!

Did you replace firebase/TubeSock with TakahikoKawasaki/nv-websocket-client in the version of your application that produced the problems? If so, I'm afraid we can't do anything here, unless you can re-produce the same problems with the former library.

However, I'd love to get your feedback when we do the switch to TakahikoKawasaki/nv-websocket-client soon, which is very likely.

@maximsushkevich
Copy link
Author

Looks like the problem was because I didn't use meteor disconnect. I have added disconnect to activity on destroy and looks like everything is ok. But it is very strange. When I used disconnect in on pause and connect on resume connection didn't worke properly.

I have found one more strange issue: to get information from server I need subscribe to necessary data after each request. It is very strange. Is way to check subscriptions?

Thank you!

@ocram
Copy link
Contributor

ocram commented Oct 15, 2016

Looks like the problem was because I didn't use meteor disconnect.

Glad to hear that, thanks for resolving this issue!

When I used disconnect in on pause and connect on resume connection didn't worke properly.

That's strange, indeed. As you assumed, it should really work in both scenarios, when you connect/disconnect in onCreate/onDestroy or when you do so in onPause/onResume.

to get information from server I need subscribe to necessary data after each request. It is very strange. Is way to check subscriptions?

What do you refer to with "each request"? Do you experience that you have to re-subscribe after every re-connect? That's plausible, since subscriptions are only kept if the session is not lost.

@ocram ocram closed this as completed Oct 15, 2016
@ocram
Copy link
Contributor

ocram commented Oct 18, 2016

There are some news in #101 that might be relevant.

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

No branches or pull requests

2 participants