mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[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 commit96e1e76306. * Fix * Update entity.cpp * Update dbcore.cpp * [World] Check if port in use to avoid double booting mistakes * Revert "Stuff" This reverts commit2162c00edd. * Revert "Potentially fix aura crash" This reverts commit7c242723f4. * Revert "Fix" This reverts commit8419e284d4. * Revert "Update entity.cpp" This reverts commit8a1f4545a4. * Revert "Update dbcore.cpp" This reverts commitf0278d9591.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user