summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-03 22:16:47 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-03 22:16:47 +0300
commit653f89fa3b236103670796af4b76a23e8ae84248 (patch)
treeaf2f09cc6523df3c9929b8e6e14f953c3e6ab8ec
parentaf61285030fa17604a0d3812c679c45cdc8c2a5d (diff)
downloadplus-653f89fa3b236103670796af4b76a23e8ae84248.tar.gz
plus-653f89fa3b236103670796af4b76a23e8ae84248.tar.bz2
plus-653f89fa3b236103670796af4b76a23e8ae84248.tar.xz
plus-653f89fa3b236103670796af4b76a23e8ae84248.zip
Always unload dbs and remove net handlers.
-rw-r--r--src/client.cpp1
-rw-r--r--src/net/net.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index e050bf5cd..21f44d66a 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1925,6 +1925,7 @@ void Client::loadData()
void Client::unloadData()
{
+ DbManager::unloadDb();
mCurrentServer.supportUrl.clear();
settings.supportUrl.clear();
if (settings.options.dataPath.empty())
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 3bd115bf0..02bfd06ce 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -126,6 +126,7 @@ void connectToServer(const ServerInfo &server)
generalHandler != nullptr)
{
generalHandler->unload();
+ delete2(generalHandler);
}
switch (server.type)