From a26c92d7dda327f2b1483fe7250cb27580a0a039 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 24 Dec 2010 17:08:50 +0200 Subject: disconnect method to connection to be used instead of just timing out --- src/client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/client.cpp') 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" <