}
{
- ScopeProfiler sp(g_profiler, "Server: sel and send blocks to clients");
// Send blocks to clients
SendBlocks(dtime);
}
if(counter >= g_settings->getFloat("server_map_save_interval"))
{
counter = 0.0;
+ JMutexAutoLock lock(m_env_mutex);
ScopeProfiler sp(g_profiler, "Server: saving stuff");
if(m_authmanager.isModified())
m_authmanager.save();
- //Bann stuff
+ //Ban stuff
if(m_banmanager.isModified())
m_banmanager.save();
- // Map
- JMutexAutoLock lock(m_env_mutex);
-
// Save changed parts of map
m_env->getMap().save(MOD_STATE_WRITE_NEEDED);
JMutexAutoLock envlock(m_env_mutex);
JMutexAutoLock conlock(m_con_mutex);
+ ScopeProfiler sp(g_profiler, "Server::ProcessData");
+
try{
Address address = m_con.GetPeerAddress(peer_id);
JMutexAutoLock envlock(m_env_mutex);
JMutexAutoLock conlock(m_con_mutex);
- //TimeTaker timer("Server::SendBlocks");
+ ScopeProfiler sp(g_profiler, "Server: sel and send blocks to clients");
core::array<PrioritySortedBlockTransfer> queue;