Hello There,
We had a code block on our user login struuctre. This block checks users list with user's unique name and if user logged in more than one device, code sends forcelogout message to user and users' firstly logged in device logs out.
On Friday we upgraded our SmartfoxServer 2.12.0 to 2.12.4, after this upgrade this code block started to giving response very lately. User logs in more than one device in game, after two or three minutes users' firstly logged in device logs out. This is problem. Then, we downgraded to SmartfoxServer 2.12.0. Everything is normal. Can we check this problem again? What is the solution about it?
Thanks in advance.
Multiple Login Same Account Bug SFS2X Patch 2.12.4
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
Having same problem...
Custom login... After upgrading from 2.12.3>2.12.4... When I open two game clients with the same user login, one after the other, the first client isn't immediately logged out with a disconnect message anymore, so my logs get spammed with these from the first clients requests still coming in...
"Exception: com.smartfoxserver.v2.exceptions.SFSRuntimeException
Message: System Request rejected: { Id: 6, Type: DEFAULT, Logged: No, IP: 127.0.0.1:50533 }, Client is not logged in.
Description: Runtime error while processing request"
Custom login... After upgrading from 2.12.3>2.12.4... When I open two game clients with the same user login, one after the other, the first client isn't immediately logged out with a disconnect message anymore, so my logs get spammed with these from the first clients requests still coming in...
"Exception: com.smartfoxserver.v2.exceptions.SFSRuntimeException
Message: System Request rejected: { Id: 6, Type: DEFAULT, Logged: No, IP: 127.0.0.1:50533 }, Client is not logged in.
Description: Runtime error while processing request"
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
From the server side I see that clients are disconnected immediately, no lag. This is locally of course.
Over the internet things will not necessarily happen instantaneously, depending on the conditions of the network.
Anyway, we'll run a few more tests and report back.
Over the internet things will not necessarily happen instantaneously, depending on the conditions of the network.
Anyway, we'll run a few more tests and report back.
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
Lapo wrote:From the server side I see that clients are disconnected immediately, no lag. This is locally of course.
Over the internet things will not necessarily happen instantaneously, depending on the conditions of the network.
Anyway, we'll run a few more tests and report back.
I am testing locally. Server side is fine, it's just that the old clients with the same username still think they are connected now... They are not receiving any disconnect message for around thirty seconds to a minute or so.
The previous behavior was that when you logged in with a username that was currently active, the older client with the same username would be immediately disconnected.
This is still set for all my zones... "<isForceLogout>true</isForceLogout>"
Update: I tried adding this to my loginHandler as a workaround...
Older user is disconnected, but the old client still doesn't receive any notification of disconnect and cannot tell its disconnected. Meh... Maybe I should revert back to 2.12.3 to verify that it appeared in 2.12.4.
Code: Select all
//Disconnect old client if exists
User oldUser = getApi().getUserByName(sfsName);
if (oldUser != null) {
trace(ExtensionLogLevel.ERROR, "ERROR: Disconnect old user");
getApi().disconnectUser(oldUser);
}
Last edited by meanvel on 12 Apr 2017, 05:10, edited 2 times in total.
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
Update:
Fresh install of SFS2X 2.12...
Patched > Tested version 2.12.2 > No issues.
Patched > Tested version 2.12.3 > No issues.
Patched > Tested version 2.12.4 > Yep... Problem appears in this version...
msaygi, you should be able to update to 2.12.3 without issues for now.
Fresh install of SFS2X 2.12...
Patched > Tested version 2.12.2 > No issues.
Patched > Tested version 2.12.3 > No issues.
Patched > Tested version 2.12.4 > Yep... Problem appears in this version...
msaygi, you should be able to update to 2.12.3 without issues for now.
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
Working workaround for version 2.12.4. Included this *AFTER* the password verification within my custom login handler class.
If it were placed before password verification, anyone could just enter in anyones name and kick them offline...
Code: Select all
//Kick prior client on double login
User oldUser = getApi().getUserByName(userNameString);
if (oldUser != null) {
trace(ExtensionLogLevel.WARN, "Double login attempt");
getApi().kickUser(oldUser,null,"Double Login",0);
}
If it were placed before password verification, anyone could just enter in anyones name and kick them offline...
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
Lapo wrote:Update: We have a pre-release patch that addresses this issue. You can download it here
Let us know.
That patch fixed the problem. Thanks!
Re: Multiple Login Same Account Bug SFS2X Patch 2.12.4
Thanks for the feedback.
Who is online
Users browsing this forum: Stevenor and 86 guests