Since you aren’t disconnecting the client gracefully (that is, by not attempting to notify the Server you are leaving) - the Server is likely waiting for the player connection to timeout instead, before it removes the controller and calls “Logout”.
You don’t want to make that timeout too short, because then legitimatelly connected players can timeout. The best way to handle this is to add a “graceful” logout process. You could even hijack the alt+f4 command to attempt that before closing the application.
If you are using sessions, ending and destroying the session is usually enough to notify the server that a player is leaving.