Integrate the monitor's listener socket into the shard's poll()

This removes the need for a separate monitor thread.
This commit is contained in:
2020-12-06 01:44:37 +01:00
parent 53d8cb67ba
commit 92307063fc
7 changed files with 44 additions and 30 deletions

View File

@@ -38,8 +38,6 @@
CNShardServer *shardServer = nullptr;
std::thread *shardThread = nullptr;
std::thread *monitorThread = nullptr;
void startShard(CNShardServer* server) {
server->start();
}
@@ -104,7 +102,6 @@ int main() {
TransportManager::init();
BuddyManager::init();
GroupManager::init();
Monitor::init();
Database::open();
switch (settings::EVENTMODE) {
@@ -123,7 +120,6 @@ int main() {
shardServer = new CNShardServer(settings::SHARDPORT);
shardThread = new std::thread(startShard, (CNShardServer*)shardServer);
monitorThread = new std::thread(Monitor::start, nullptr);
loginServer.start();