From 3588d89b2cba36415991c46c300b1f9c94f109bf Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 13 Feb 2008 23:14:41 +0000 Subject: * Bigish ODE stability Update. Run Prebuild --- .../Region/Communications/OGS1/OGS1GridServices.cs | 131 ++++++++++++--------- 1 file changed, 73 insertions(+), 58 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1/OGS1GridServices.cs') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index f8ab9ef..1953140 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -825,77 +825,92 @@ namespace OpenSim.Region.Communications.OGS1 /// public bool InformRegionOfPrimCrossing(ulong regionHandle, LLUUID primID, string objData) { - RegionInfo regInfo = null; - try + int failures = 0; + lock (m_deadRegionCache) { - if (m_localBackend.InformRegionOfPrimCrossing(regionHandle, primID, objData)) + if (m_deadRegionCache.ContainsKey(regionHandle)) { - return true; + failures = m_deadRegionCache[regionHandle]; } - - regInfo = RequestNeighbourInfo(regionHandle); - if (regInfo != null) + } + if (failures <= 3) + { + RegionInfo regInfo = null; + try { - //don't want to be creating a new link to the remote instance every time like we are here - bool retValue = false; - - - OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting) Activator.GetObject( - typeof (OGS1InterRegionRemoting), - "tcp://" + regInfo.RemotingAddress + - ":" + regInfo.RemotingPort + - "/InterRegions"); - - if (remObject != null) + if (m_localBackend.InformRegionOfPrimCrossing(regionHandle, primID, objData)) { - retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.UUID, objData); + return true; } - else + + regInfo = RequestNeighbourInfo(regionHandle); + if (regInfo != null) { - Console.WriteLine("remoting object not found"); - } - remObject = null; + //don't want to be creating a new link to the remote instance every time like we are here + bool retValue = false; - return retValue; + OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( + typeof(OGS1InterRegionRemoting), + "tcp://" + regInfo.RemotingAddress + + ":" + regInfo.RemotingPort + + "/InterRegions"); + + if (remObject != null) + { + retValue = remObject.InformRegionOfPrimCrossing(regionHandle, primID.UUID, objData); + } + else + { + Console.WriteLine("remoting object not found"); + } + remObject = null; + + + return retValue; + } + NoteDeadRegion(regionHandle); + return false; } - NoteDeadRegion(regionHandle); - return false; - } - catch (RemotingException e) - { - NoteDeadRegion(regionHandle); - m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle); - m_log.Debug(e.ToString()); - return false; - } - catch (SocketException e) - { - NoteDeadRegion(regionHandle); - m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle); - m_log.Debug(e.ToString()); - return false; - } - catch (InvalidCredentialException e) - { - NoteDeadRegion(regionHandle); - m_log.Warn("Invalid Credential Exception: Invalid Credentials : " + regionHandle); - m_log.Debug(e.ToString()); - return false; - } - catch (AuthenticationException e) - { - NoteDeadRegion(regionHandle); - m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + regionHandle); + catch (RemotingException e) + { + NoteDeadRegion(regionHandle); + m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle); + m_log.Debug(e.ToString()); + return false; + } + catch (SocketException e) + { + NoteDeadRegion(regionHandle); + m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regionHandle); + m_log.Debug(e.ToString()); + return false; + } + catch (InvalidCredentialException e) + { + NoteDeadRegion(regionHandle); + m_log.Warn("Invalid Credential Exception: Invalid Credentials : " + regionHandle); + m_log.Debug(e.ToString()); + return false; + } + catch (AuthenticationException e) + { + NoteDeadRegion(regionHandle); + m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + regionHandle); - m_log.Debug(e.ToString()); - return false; + m_log.Debug(e.ToString()); + return false; + } + catch (Exception e) + { + NoteDeadRegion(regionHandle); + m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regionHandle); + m_log.Debug(e.ToString()); + return false; + } } - catch (Exception e) + else { - NoteDeadRegion(regionHandle); - m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regionHandle); - m_log.Debug(e.ToString()); return false; } } -- cgit v1.1