[World] Check if port in use to avoid double booting mistakes (#4740)

* Stuff

* Potentially fix aura crash

* Reload crash fix

* Revert "Reload crash fix"

This reverts commit 96e1e76306.

* Fix

* Update entity.cpp

* Update dbcore.cpp

* [World] Check if port in use to avoid double booting mistakes

* Revert "Stuff"

This reverts commit 2162c00edd.

* Revert "Potentially fix aura crash"

This reverts commit 7c242723f4.

* Revert "Fix"

This reverts commit 8419e284d4.

* Revert "Update entity.cpp"

This reverts commit 8a1f4545a4.

* Revert "Update dbcore.cpp"

This reverts commit f0278d9591.
This commit is contained in:
Chris Miles
2025-03-03 00:04:03 -06:00
committed by GitHub
parent 8b13434197
commit de4226fdc9
3 changed files with 85 additions and 0 deletions
+11
View File
@@ -89,6 +89,7 @@
#include "../common/events/player_event_logs.h"
#include "../common/skill_caps.h"
#include "../common/repositories/character_parcels_repository.h"
#include "../common/ip_util.h"
SkillCaps skill_caps;
ZoneStore zone_store;
@@ -188,6 +189,16 @@ int main(int argc, char **argv)
launcher_list.LoadList();
zoneserver_list.Init();
if (IpUtil::IsPortInUse(Config->WorldIP, Config->WorldTCPPort)) {
LogError("World port [{}] already in use", Config->WorldTCPPort);
return 1;
}
if (IpUtil::IsPortInUse(Config->TelnetIP, Config->TelnetTCPPort)) {
LogError("Telnet port [{}] already in use", Config->TelnetTCPPort);
return 1;
}
std::unique_ptr<EQ::Net::ConsoleServer> console;
if (Config->TelnetEnabled) {
LogInfo("Console (TCP) listener started on [{}:{}]", Config->TelnetIP, Config->TelnetTCPPort);