Core/Network: Changed AsyncAcceptor to have a start method that returns false if it can't start the network.
Core/Logging: Cleaned up network logging.
This commit is contained in:
@@ -36,7 +36,13 @@ namespace Game.Network
|
||||
if (!base.StartNetwork(bindIp, port, threadCount))
|
||||
return false;
|
||||
|
||||
_instanceAcceptor = new AsyncAcceptor(bindIp, WorldConfig.GetIntValue(WorldCfg.PortInstance));
|
||||
_instanceAcceptor = new AsyncAcceptor();
|
||||
if (!_instanceAcceptor.Start(bindIp, WorldConfig.GetIntValue(WorldCfg.PortInstance)))
|
||||
{
|
||||
Log.outError(LogFilter.Network, "StartNetwork failed to start instance AsyncAcceptor");
|
||||
return false;
|
||||
}
|
||||
|
||||
_instanceAcceptor.AsyncAcceptSocket(OnSocketOpen);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user