{"action":"created","issue":{"url":"https://api.github.com/repos/cmangos/issues/issues/945","repository_url":"https://api.github.com/repos/cmangos/issues","labels_url":"https://api.github.com/repos/cmangos/issues/issues/945/labels{/name}","comments_url":"https://api.github.com/repos/cmangos/issues/issues/945/comments","events_url":"https://api.github.com/repos/cmangos/issues/issues/945/events","html_url":"https://github.com/cmangos/issues/issues/945","id":157307973,"number":945,"title":"Stuck on \"Retrieving character list\" after logout with timer, crash sometimes","user":{"login":"Lankytim","id":2998673,"avatar_url":"https://avatars.githubusercontent.com/u/2998673?v=3","gravatar_id":"","url":"https://api.github.com/users/Lankytim","html_url":"https://github.com/Lankytim","followers_url":"https://api.github.com/users/Lankytim/followers","following_url":"https://api.github.com/users/Lankytim/following{/other_user}","gists_url":"https://api.github.com/users/Lankytim/gists{/gist_id}","starred_url":"https://api.github.com/users/Lankytim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lankytim/subscriptions","organizations_url":"https://api.github.com/users/Lankytim/orgs","repos_url":"https://api.github.com/users/Lankytim/repos","events_url":"https://api.github.com/users/Lankytim/events{/privacy}","received_events_url":"https://api.github.com/users/Lankytim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-27T23:41:13Z","updated_at":"2016-06-20T20:25:40Z","closed_at":null,"body":"**Current behavior**: \r\nCharacter selection screen stuck on \"Retrieving character list\" after character logout.  Need to hit Cancel then re-select realm to get character list back.  Also sometimes server crashes on re-login.\r\n\r\n**Expected behavior**: \r\nCharacter selection screen should appear with characters populated, ready to re-log in to game.\r\n\r\n**Steps to reproduce**:\r\n1. Log in with an account containing at least 2 characters\r\n2. Move character A into a safe zone (Green map or an Inn) then choose Logout from game menu\r\n3. Move character B to a Yellow map (or somewhere that causes the 20sec logout timer) then choose Logout from game menu and wait\r\n4. Log in immediately with character B again - can cause server crash (1 time in 4 with my testing); or log in with character A again and everything seems fine\r\n\r\n**Client version**: \r\n2.4.3 (8606)\r\n\r\n**Commit hash**: \r\nhttps://github.com/cmangos/mangos-tbc/commit/69bf156f8956e4bf7c4421f1d5e81835944af161\r\n\r\n**Database version**: \r\nTBC-DB 1.5.0\r\nACID 2.4.3\r\n\r\n**Operating system**: \r\nLinux Debian 8 Jessie 64bit\r\n\r\n[//]: # (If this is a crash report, include the crashlog from a debug build with https://gist.github.com/)\r\n"},"comment":{"url":"https://api.github.com/repos/cmangos/issues/issues/comments/227258645","html_url":"https://github.com/cmangos/issues/issues/945#issuecomment-227258645","issue_url":"https://api.github.com/repos/cmangos/issues/issues/945","id":227258645,"user":{"login":"NocFenix","id":11673470,"avatar_url":"https://avatars.githubusercontent.com/u/11673470?v=3","gravatar_id":"","url":"https://api.github.com/users/NocFenix","html_url":"https://github.com/NocFenix","followers_url":"https://api.github.com/users/NocFenix/followers","following_url":"https://api.github.com/users/NocFenix/following{/other_user}","gists_url":"https://api.github.com/users/NocFenix/gists{/gist_id}","starred_url":"https://api.github.com/users/NocFenix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NocFenix/subscriptions","organizations_url":"https://api.github.com/users/NocFenix/orgs","repos_url":"https://api.github.com/users/NocFenix/repos","events_url":"https://api.github.com/users/NocFenix/events{/privacy}","received_events_url":"https://api.github.com/users/NocFenix/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T20:25:40Z","updated_at":"2016-06-20T20:25:40Z","body":"I noticed this exact same issue as well. Digging into the code, I found a fix that seems to work. I haven't noticed any negative side effects, but, if you want to try it out:\r\n\r\nIn WorldSession.cpp around line 293:\r\n\r\n    // check if we are safe to proceed with logout\r\n    // logout procedure should happen only in World::UpdateSessions() method!!!\r\n    if (updater.ProcessLogout())\r\n    {\r\n        ///- If necessary, log the player out\r\n        const time_t currTime = time(nullptr);\r\n\r\n        if (m_Socket->IsClosed() || (ShouldLogOut(currTime) && !m_playerLoading))\r\n        {\r\n            LogoutPlayer(true);\r\n\t        return true; // false;\r\n        }\r\n    }\r\n\r\nChanged `return false;` to `return true;` From what I can tell, this change basically says to keep the session open. When it was closing the session it expired and logged the player out; thus preventing the character list from repopulating.\r\n\r\nAgain, I have not seen any adverse effects yet from this change, but I'll post back if I do find any."}}
{"actor":{"display_login":"NocFenix"}}