Fixed a bug so that "ssync start" won't start new connections if a region is already synced.
parent
b5f1137a7d
commit
95be9c1f7d
|
@ -176,6 +176,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
|
||||
private RegionSyncListener m_localSyncListener = null;
|
||||
private bool m_synced = false;
|
||||
|
||||
// Lock is used to synchronize access to the update status and update queues
|
||||
private object m_updateSceneObjectPartLock = new object();
|
||||
|
@ -620,10 +621,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
{
|
||||
GetRemoteSyncListenerInfo();
|
||||
}
|
||||
StartSyncConnections();
|
||||
if (StartSyncConnections())
|
||||
{
|
||||
DoInitialSync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SyncStop(Object[] args)
|
||||
{
|
||||
|
@ -655,12 +658,18 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
|
||||
//Start connections to each remote listener.
|
||||
//For now, there is only one remote listener.
|
||||
private void StartSyncConnections()
|
||||
private bool StartSyncConnections()
|
||||
{
|
||||
if (m_remoteSyncListeners == null)
|
||||
{
|
||||
m_log.Error(LogHeader + " SyncListener's address or port has not been configured.");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_synced)
|
||||
{
|
||||
m_log.Warn(LogHeader + ": Already synced.");
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (RegionSyncListenerInfo remoteListener in m_remoteSyncListeners)
|
||||
|
@ -672,6 +681,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
AddSyncConnector(syncConnector);
|
||||
}
|
||||
}
|
||||
|
||||
m_synced = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//To be called when a SyncConnector needs to be created by that the local listener receives a connection request
|
||||
|
|
Loading…
Reference in New Issue