diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 11 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IGridService.cs | 45 |
2 files changed, 9 insertions, 47 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 2deb2d1..7e81be7 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -34,7 +34,7 @@ using System.Reflection; | |||
34 | using System.Timers; | 34 | using System.Timers; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Monitoring; |
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | 40 | ||
@@ -135,7 +135,11 @@ namespace OpenSim.Services.Connectors | |||
135 | 135 | ||
136 | for (int i = 0 ; i < 2 ; i++) | 136 | for (int i = 0 ; i < 2 ; i++) |
137 | { | 137 | { |
138 | Util.FireAndForget(delegate { AssetRequestProcessor();}); | 138 | m_fetchThreads[i] = WorkManager.StartThread(AssetRequestProcessor, |
139 | String.Format("GetTextureWorker{0}", i), | ||
140 | ThreadPriority.Normal, | ||
141 | true, | ||
142 | false); | ||
139 | } | 143 | } |
140 | } | 144 | } |
141 | 145 | ||
@@ -357,7 +361,8 @@ namespace OpenSim.Services.Connectors | |||
357 | 361 | ||
358 | while (true) | 362 | while (true) |
359 | { | 363 | { |
360 | r = m_requestQueue.Dequeue(2000); | 364 | r = m_requestQueue.Dequeue(4500); |
365 | Watchdog.UpdateThread(); | ||
361 | if(r== null) | 366 | if(r== null) |
362 | continue; | 367 | continue; |
363 | string uri = r.uri; | 368 | string uri = r.uri; |
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 8068ff5..ead5d3c 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -462,50 +462,7 @@ namespace OpenSim.Services.Interfaces | |||
462 | /// </value> | 462 | /// </value> |
463 | public IPEndPoint ExternalEndPoint | 463 | public IPEndPoint ExternalEndPoint |
464 | { | 464 | { |
465 | get | 465 | get { return Util.getEndPoint(m_externalHostName, m_internalEndPoint.Port); } |
466 | { | ||
467 | IPAddress ia = null; | ||
468 | // If it is already an IP, don't resolve it - just return directly | ||
469 | // we should not need this | ||
470 | if (IPAddress.TryParse(m_externalHostName, out ia)) | ||
471 | { | ||
472 | if (ia.Equals(IPAddress.Any) || ia.Equals(IPAddress.IPv6Any)) | ||
473 | return null; | ||
474 | return new IPEndPoint(ia, m_internalEndPoint.Port); | ||
475 | } | ||
476 | |||
477 | // Reset for next check | ||
478 | ia = null; | ||
479 | try | ||
480 | { | ||
481 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) | ||
482 | { | ||
483 | if (ia == null) | ||
484 | ia = Adr; | ||
485 | |||
486 | if (Adr.AddressFamily == AddressFamily.InterNetwork) | ||
487 | { | ||
488 | ia = Adr; | ||
489 | break; | ||
490 | } | ||
491 | } | ||
492 | } | ||
493 | catch // (SocketException e) | ||
494 | { | ||
495 | /*throw new Exception( | ||
496 | "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + | ||
497 | e + "' attached to this exception", e);*/ | ||
498 | // Don't throw a fatal exception here, instead, return Null and handle it in the caller. | ||
499 | // Reason is, on systems such as OSgrid it has occured that known hostnames stop | ||
500 | // resolving and thus make surrounding regions crash out with this exception. | ||
501 | return null; | ||
502 | } | ||
503 | |||
504 | if(ia == null) | ||
505 | return null; | ||
506 | |||
507 | return new IPEndPoint(ia, m_internalEndPoint.Port); | ||
508 | } | ||
509 | } | 466 | } |
510 | 467 | ||
511 | public string ExternalHostName | 468 | public string ExternalHostName |