diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-04-12 21:52:27 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-16 17:43:52 -0600 |
commit | cf4a1da4eaffe19090a2246e0d3111b885a64ace (patch) | |
tree | 6187c8c7a91796e485c71ea7c88c819bec902b66 /src/net/manaserv/generalhandler.cpp | |
parent | 11a6f342e579c26320334b9ae9735701386e3b25 (diff) | |
download | mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.gz mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.bz2 mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.tar.xz mana-cf4a1da4eaffe19090a2246e0d3111b885a64ace.zip |
Fix canceling game connection
Reviewed-by: Bertram
Diffstat (limited to 'src/net/manaserv/generalhandler.cpp')
-rw-r--r-- | src/net/manaserv/generalhandler.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp index 0e030aa8..454052f7 100644 --- a/src/net/manaserv/generalhandler.cpp +++ b/src/net/manaserv/generalhandler.cpp @@ -122,8 +122,20 @@ void GeneralHandler::load() void GeneralHandler::reload() { - static_cast<CharHandler*>(mCharHandler.get())->setCharCreateDialog(0); - static_cast<CharHandler*>(mCharHandler.get())->setCharSelectDialog(0); + static_cast<CharHandler*>(Net::getCharHandler())->clear(); + + if (accountServerConnection) + accountServerConnection->disconnect(); + + if (gameServerConnection) + gameServerConnection->disconnect(); + + if (chatServerConnection) + chatServerConnection->disconnect(); + + netToken.clear(); + gameServer.clear(); + chatServer.clear(); } void GeneralHandler::unload() |