mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Merge pull request #1219 from DarkflameUniverse/lol
fix: Address race condition
This commit is contained in:
commit
4c507e34a5
@ -581,7 +581,8 @@ void HandlePacket(Packet* packet) {
|
||||
inStream.Read(theirServerType);
|
||||
theirIP = PacketUtils::ReadString(24, packet, false); //24 is the current offset
|
||||
|
||||
if (theirServerType == ServerType::World && !Game::im->IsPortInUse(theirPort)) {
|
||||
if (theirServerType == ServerType::World) {
|
||||
if (!Game::im->IsPortInUse(theirPort)) {
|
||||
Instance* in = new Instance(theirIP, theirPort, theirZoneID, theirInstanceID, 0, 12, 12);
|
||||
|
||||
SystemAddress copy;
|
||||
@ -597,6 +598,7 @@ void HandlePacket(Packet* packet) {
|
||||
instance->SetSysAddr(packet->systemAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (theirServerType == ServerType::Chat) {
|
||||
SystemAddress copy;
|
||||
|
Loading…
Reference in New Issue
Block a user