diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-24 17:08:50 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-24 17:08:50 +0200 |
commit | a26c92d7dda327f2b1483fe7250cb27580a0a039 (patch) | |
tree | 1f7a7b9cb9ceb200fa5e1480961cd9bbe9ae38a3 /src/client.cpp | |
parent | 705de63dcdfe78157234e1b65652d5c2f762dbd4 (diff) | |
download | minetest-a26c92d7dda327f2b1483fe7250cb27580a0a039.tar.gz minetest-a26c92d7dda327f2b1483fe7250cb27580a0a039.tar.bz2 minetest-a26c92d7dda327f2b1483fe7250cb27580a0a039.zip |
disconnect method to connection to be used instead of just timing out
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index f9cccd855..b0750cae6 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -117,6 +117,11 @@ Client::Client( Client::~Client() { + { + JMutexAutoLock conlock(m_con_mutex); + m_con.Disconnect(); + } + m_thread.setRun(false); while(m_thread.IsRunning()) sleep_ms(100); @@ -601,7 +606,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) addNode(p, n); } - if(command == TOCLIENT_PLAYERPOS) + else if(command == TOCLIENT_PLAYERPOS) { dstream<<"WARNING: Received deprecated TOCLIENT_PLAYERPOS" <<std::endl; |