ProjectMoon / ringmud

RingMUD Java Mud Server and Engine
http://ringmud.thermetics.net/
GNU Lesser General Public License v3.0
21 stars 5 forks source link

Quit players hanging #14

Closed ProjectMoon closed 14 years ago

ProjectMoon commented 14 years ago

For some reason, players seem to be hanging after they quit. The connection is shut down properly, but the player's character persists in the game world. This was noticed on the development server.

ProjectMoon commented 14 years ago

Steps to reproduce:

  1. Get yourself disconnected abnormally.
  2. Log back in and then quit normally.
  3. Log back in normally.

By doing this, you should have a dupe of your character in the world. Current theory is that PlayerShell adds you to the origin room again even if you are coming back in from an abnormal disconnect. Thus, you get an extra reference in the Room. When you log out gracefully, only one instance is removed. When you log back in again, that old stale reference is still there. Thus, you get a dupe.

ProjectMoon commented 14 years ago

Fixed by making sure that PlayerShell only sets the room when a player is logging in normally, not returning from an old connection.