summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index ffd295008..071903797 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -571,6 +571,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap()
}
}
+ if (this->savegame_mutex != NULL) this->savegame_mutex->EndCritical();
+
/* Send all packets (forced) and check if we have send it all */
if (this->SendPackets() && this->IsPacketQueueEmpty()) {
/* All are sent, increase the sent_packets */
@@ -579,8 +581,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap()
/* Not everything is sent, decrease the sent_packets */
if (sent_packets > 1) sent_packets /= 2;
}
-
- if (this->savegame_mutex != NULL) this->savegame_mutex->EndCritical();
}
return NETWORK_RECV_STATUS_OKAY;
}