LeaveRoom SFSApi Exception

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

Moderators: Lapo, Bax

ersindemir
Posts: 30
Joined: 30 Apr 2016, 07:23
Location: Turkey

LeaveRoom SFSApi Exception

Postby ersindemir » 08 Feb 2017, 09:04

Sometimes smartfox write this exception on console.

Code: Select all

Exception: com.smartfoxserver.v2.exceptions.SFSRuntimeException
Message: LeaveRoom failed: user is not joined in any room. ( User Name: xxxxxxxxx, Id: x, Priv: 0, Sess: x.x.x.x:xxxx )
Description: Runtime error while processing request
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.api.SFSApi.leaveRoom(SFSApi.java:1023)
com.smartfoxserver.v2.controllers.system.LeaveRoom.execute(LeaveRoom.java:47)
com.smartfoxserver.v2.controllers.v290.SystemReqController.processRequest(SystemReqController.java:172)
com.smartfoxserver.v2.controllers.v290.SystemReqController.enqueueRequest(SystemReqController.java:127)
com.smartfoxserver.bitswarm.io.protocols.AbstractProtocolCodec.dispatchRequestToController(AbstractProtocolCodec.java:39)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.dispatchRequest(SFSProtocolCodec.java:133)
com.smartfoxserver.v2.protocol.SFSProtocolCodec.onPacketRead(SFSProtocolCodec.java:90)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler$1.run(BinaryIoHandler.java:477)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)


Why this happen ?

Backend v: 2.12.0
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: LeaveRoom SFSApi Exception

Postby Lapo » 08 Feb 2017, 09:36

I think the error message is straightforward:
Message: LeaveRoom failed: user is not joined in any room.

That's it. A client sent a LeaveRoom request but he was not joined in any Room. This doesn't really cause any harm but it indicates that you're probably not handling all the game states.

For instance, if a client fails to join a Room he shouldn't be allowed to send the LeaveRoom request, since there's no room to leave.

In any case, as I said, this is a warning that causes no real issues.

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 49 guests