Login error: Another user is already logged in with the same name

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

burnside
Posts: 24
Joined: 11 Mar 2017, 09:30

Login error: Another user is already logged in with the same name

Postby burnside » 20 Apr 2017, 03:14

SFS version 2.12.3
AS3 API version 1.7.5
SFS admin tool zone config:
Use custom login: ON
Force logout: ON

We are using custom login, all works as expected until a player hits their browser refresh button and gets an error about already being logged in.

First login:

19 Apr 2017 | 19:23:45,696 | INFO | SFSWorker:Ext:4 | v2.api.SFSApi | | User login: { Zone: bunco1 }, ( User Name: XXX, Id: 0, Priv: 0, Sess: x.x.x.x:33757 ) , Type: Flash

Second login: (browser refresh)

19 Apr 2017 | 19:24:05,729 | INFO | SFSWorker:Ext:2 | v2.api.SFSApi | | Login error: Another user is already logged with the same name: XXX. Requested by: { Id: 8, Type: DEFAULT, Logged: No, IP: x.x.x.x:33851 }

What are we doing wrong?

Ok... figured it out before I finished the post. :) Posting anyway as this may help someone else...

When you "zone.setForceLogout(false);" in the code, it IS NOT REFLECTED in the admin tool. Neither the zone configurator nor the zone monitor.

Cheers.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Login error: Another user is already logged in with the same name

Postby Lapo » 20 Apr 2017, 07:55

Yes, because what you see in the AdminTool is stored in the static server configuration.
What you're doing is dynamically changing a property of the Zone.

I'd recommend using the AdminTool to avoid confusion.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
burnside
Posts: 24
Joined: 11 Mar 2017, 09:30

Re: Login error: Another user is already logged in with the same name

Postby burnside » 20 Apr 2017, 16:58

I completely understand the zone configurator not reflecting it.

It's the zone monitor not showing it that was frustrating. :) It's possible I missed it somewhere in there though?

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 70 guests