hi,
Step1: I have a connection to server and login to the Zone. When I disconnect it (use Smartfox.Disconnect()) and connect (+ login same user) again. The server appeared: User already logged in. Disconnecting previous instance.
but it still log in to the Zone. but when I join a room. The event OnJoinRoom was called 2 times if I do "Step1" 2 times. 3 times or more if I do "Step1" 3 or more times.
What happens and how to fix that?
Thanks
Duplicate sessions when Disconnect a connection and connect again.
-
- Posts: 8
- Joined: 02 May 2019, 09:38
Re: Duplicate sessions when Disconnect a connection and connect again.
Hi,
after a disconnection you should remove all listeners from the current SmartFox instance and recreate it, since every SmartFox object is valid for one session.
Hope it helps
after a disconnection you should remove all listeners from the current SmartFox instance and recreate it, since every SmartFox object is valid for one session.
Hope it helps
-
- Posts: 8
- Joined: 02 May 2019, 09:38
Re: Duplicate sessions when Disconnect a connection and connect again.
Lapo wrote:Hi,
after a disconnection you should remove all listeners from the current SmartFox instance and recreate it, since every SmartFox object is valid for one session.
Hope it helps
Thank you, it's helpful
Who is online
Users browsing this forum: Google [Bot] and 48 guests