SFX JS 1.7.6 exception

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

aiversonwk
Posts: 5
Joined: 02 Jun 2016, 06:08

SFX JS 1.7.6 exception

Postby aiversonwk » 27 Oct 2017, 03:34

Hi:
I got an exception with Sfx 1.7.6.

Stack:
JS Exception: scope._sfs is null, file: assets/src/assets/plugins/sfs2x-api-1.7.6.js, lineno: 18
Stack: _threadRunner@assets/src/assets/plugins/sfs2x-api-1.7.6.js:18:16919


Reproduction steps:
1. Login game with Sfx
2. Set enableLagMonitor(true) open pingpong package
3. Try make connect lost(turn off wifi or switch it)
4. Recv onConnectionLost, remove eventListener, set enableLagMonitor(false), set sfx instance with null
5. Reconnect game

after steps, then ever pingpong package recv, this exception will happen.

so, is my fault or Sfx ?
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: SFX JS 1.7.6 exception

Postby Bax » 27 Oct 2017, 09:29

When a disconnection occurs, the internal lag monitor is destroyed, so the enableLagMonitor(false) is not needed.
In any case this shouldn't do any harm.
Did you try to reproduce the issue with our simple Connector example (just adding the login and lag monitoring parts)?
This could let us better understand what is going on.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 21 guests