diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-08-22 21:27:11 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-08-22 21:27:11 +0300 |
commit | a99450ab729e5dfc04ed22ae8efc14b67adec734 (patch) | |
tree | 14e8eb164bf77beba8e5d50dce6d6db57a1042f7 | |
parent | 7776d6228e232ae757e3c6e0f885493e97156aa8 (diff) | |
download | minetest-a99450ab729e5dfc04ed22ae8efc14b67adec734.tar.gz minetest-a99450ab729e5dfc04ed22ae8efc14b67adec734.tar.bz2 minetest-a99450ab729e5dfc04ed22ae8efc14b67adec734.zip |
Possibly fixed the extremely rare PeerNotFound loop bug.
See explanation in http://2pktfkt.de/irc/minetest-delta/2011-08-22.html
-rw-r--r-- | src/server.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/server.cpp b/src/server.cpp index f66592047..6bcd1d058 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1252,6 +1252,20 @@ void Server::AsyncRunStep() m_uptime.set(m_uptime.get() + dtime); } + { + // Process connection's timeouts + JMutexAutoLock lock2(m_con_mutex); + ScopeProfiler sp(&g_profiler, "Server: connection timeout processing"); + m_con.RunTimeouts(dtime); + } + + { + // This has to be called so that the client list gets synced + // with the peer list of the connection + ScopeProfiler sp(&g_profiler, "Server: peer change handling"); + handlePeerChanges(); + } + /* Update m_time_of_day and overall game time */ @@ -1295,20 +1309,6 @@ void Server::AsyncRunStep() } { - // Process connection's timeouts - JMutexAutoLock lock2(m_con_mutex); - ScopeProfiler sp(&g_profiler, "Server: connection timeout processing"); - m_con.RunTimeouts(dtime); - } - - { - // This has to be called so that the client list gets synced - // with the peer list of the connection - ScopeProfiler sp(&g_profiler, "Server: peer change handling"); - handlePeerChanges(); - } - - { JMutexAutoLock lock(m_env_mutex); // Step environment ScopeProfiler sp(&g_profiler, "Server: environment step"); |