delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

Relogin issue #112

Closed PavelEgorov1 closed 7 years ago

PavelEgorov1 commented 8 years ago

I have the login menu, where i need to input email and password(by the user1). Then if it's correct appears loginWithEmail() method and it goes to main menu. When i click Exit button i return to login menu. And i login again but by other email and password (by other user2). I have reconnectThread that reconnect current user if connection is lost(your native reconnection doesn't work and overload app with logs). inside this thread i call mMeteor.reconnect() and then loginWithEmail(). It must reconnect current user2. But sometimes it reconnect previous user1 (in 50% cases). So i think loginWithEmail() or mMeteor.reconnect() doesn't work correct.

ocram commented 8 years ago

Thanks for your report!

I'm quite sure loginWithEmail is actually working correctly. There is probably something else that's missing or not working correctly here.

Can you try logging out using the logout method before signing in to the second account?

By the way, we should definitely fix the automatic re-connects done by this library. If you can point out something that's not working, I'd be happy to hear about it. Some custom thread for re-connects really shouldn't be necessary.

ocram commented 7 years ago

Closing due to inactivity