keep a unsecure http port up for external services (datasnapshot search). Only fire poolservices on main http listener

This commit is contained in:
UbitUmarov
2016-10-09 20:18:20 +01:00
parent 7aa4bd7006
commit 80d4f76d18
4 changed files with 66 additions and 36 deletions

View File

@@ -42,6 +42,7 @@ namespace OpenSim.Framework.Servers
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static BaseHttpServer instance = null;
private static BaseHttpServer unsecureinstance = null;
private static Dictionary<uint, BaseHttpServer> m_Servers = new Dictionary<uint, BaseHttpServer>();
/// <summary>
@@ -93,6 +94,21 @@ namespace OpenSim.Framework.Servers
}
}
public static BaseHttpServer ÚnSecureInstance
{
get { return unsecureinstance; }
set
{
lock (m_Servers)
if (!m_Servers.ContainsValue(value))
throw new Exception("HTTP server must already have been registered to be set as the main instance");
unsecureinstance = value;
}
}
/// <summary>
/// Get all the registered servers.
/// </summary>