mirror of
https://github.com/opensim/opensim.git
synced 2026-07-15 12:05:49 +08:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user