Make sure that modules were loaded before acknowledging that server is running
This commit is contained in:
parent
23a7a9fd40
commit
62c85aeb66
@ -72,8 +72,6 @@ Server::Server(std::atomic<bool>* running_atomic, std::optional<unsigned short>
|
|||||||
m_command_thread.reset(new std::thread(&Server::command_thread_func, this));
|
m_command_thread.reset(new std::thread(&Server::command_thread_func, this));
|
||||||
}
|
}
|
||||||
m_mod_manager.enumerate_modules();
|
m_mod_manager.enumerate_modules();
|
||||||
m_running->store(true);
|
|
||||||
m_player_update_thread.reset(new std::thread(&Server::player_update_thread_func, this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Server::~Server() {
|
Server::~Server() {
|
||||||
@ -90,6 +88,8 @@ Server::~Server() {
|
|||||||
|
|
||||||
void Server::run() {
|
void Server::run() {
|
||||||
m_mod_manager.run_modules();
|
m_mod_manager.run_modules();
|
||||||
|
m_running->store(true);
|
||||||
|
m_player_update_thread.reset(new std::thread(&Server::player_update_thread_func, this));
|
||||||
polygun::network::NetworkPacket packet;
|
polygun::network::NetworkPacket packet;
|
||||||
while(m_running->load()) {
|
while(m_running->load()) {
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user