Hello,
We are trying to update our game Eredan Arena to Unity3d from Adobe Air without changing our server but we get Multiple SFSEvents callbacks even after having logged out.
We use this:
Server Version: 1.6.8
Unity Client Version: 1.2.6
Platform: Unity
Function called:
Logout()
Disconnect()
Dispose()
(at the same time, and timed, this returns the same problem)
ProcessEventQueue() is called on FixedUpdate() and runInQueueMode is true
The problem is:
When you disconnect to the smartfox (with functions above), SFSEvent callbacks is called multiple times, increasing for each new connection.
When we remove manually the events callbacks, it stack to memory too ...
The connection work, messages too, but it stacks infinitely until a crash ...
Some times, the messages receiving just stop, without sending disconnection or anything else....
And without timeout too.
Do you have any solution?
Thank you for your help.
FM.
Multiple SFSEvent callbacks
-
- Posts: 1
- Joined: 17 Jul 2017, 12:21
Re: Multiple SFSEvent callbacks
Dairladada wrote:The problem is:
When you disconnect to the smartfox (with functions above), SFSEvent callbacks is called multiple times, increasing for each new connection.
To disconnect you just need to call Disconnect(). There's no need to invoke 3 methods.
Also I am not sure I follo the "increasing for each new connection" part. Once you have disconnected you should not reuse the current SmartFox object, instead you should release the previous listeners and create a new one (thus dereferencing the former obj.)
When we remove manually the events callbacks, it stack to memory too ...
I am not sure I understand what you mean by that. Can you give me an example?
In any case make sure to recreate the SFS object before you start a new connection.
Thanks
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 98 guests