Hopefully fixed MySQL DB crash on startup issue (so we can remove 3 sec wait).

Added option to try alternate UDP ports if the one configured is in use.
UDP packets are now bound to the actual outside IP address and hopefully won't "randomly" select IP on multihomed systems.
This commit is contained in:
Tedd Hansen
2008-02-02 06:34:07 +00:00
parent 41516fa2c3
commit b089ccfa3d
8 changed files with 78 additions and 14 deletions

View File

@@ -109,10 +109,16 @@ namespace OpenSim.Region.ClientStack
protected Scene SetupScene(RegionInfo regionInfo, out UDPServer udpServer, bool m_permissions)
{
AgentCircuitManager circuitManager = new AgentCircuitManager();
udpServer = new UDPServer((uint) regionInfo.InternalEndPoint.Port, m_assetCache, m_log, circuitManager);
IPAddress listenIP;
if (!IPAddress.TryParse(regionInfo.ExternalHostName, out listenIP))
listenIP = IPAddress.Parse("0.0.0.0");
uint port = (uint) regionInfo.InternalEndPoint.Port;
udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager);
regionInfo.InternalEndPoint.Port = (int)port;
Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
udpServer.LocalScene = scene;
scene.LoadWorldMap();