pull/1/head
吴顺明 2 years ago
parent 9d55331af6
commit e3c0b67527

@ -40,7 +40,7 @@ namespace UMC.Host
var l = hostName.IndexOf('.');
if (l > 0)
{
if (UMC.Net.Certificater.Certificates.TryGetValue("*" + hostName.Substring(l), out var x509))
if (UMC.Net.Certificater.Certificates.TryGetValue("*" + hostName.Substring(l), out var x509) || UMC.Net.Certificater.Certificates.TryGetValue("*." + hostName, out x509))
{
return x509.Certificate ?? certificate;
@ -565,7 +565,7 @@ namespace UMC.Host
UMC.Net.Certificater.Certificates[_v.Name] = _v;
}
_v.Status = -1;
pipeServer.Write(System.Text.Encoding.UTF8.GetBytes("\t\b正在签发证书,大约一分钟签发完成\r\n"));
pipeServer.Write(System.Text.Encoding.UTF8.GetBytes(hs["msg"] ?? "\t\b正在签发证书,大约一分钟签发完成\r\n"));
new System.Threading.Tasks.Task(async () =>
{
await Task.Delay(30000);

@ -34,6 +34,13 @@ namespace UMC.Host
{
switch (variable)
{
case "restart":
System.Threading.Thread.Sleep(1000);
if (IsRun() == false)
{
StartUp(args.Length == 2 ? args[1] : String.Empty);
}
return;
case "start":
if (IsRun() == false)
{
@ -293,8 +300,12 @@ namespace UMC.Host
private static void UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
UMC.Data.Utility.Error("Unhandled", DateTime.Now, $"{e.ExceptionObject}");
if (IsRestart)
{
Excel("restart");
}
}
static bool IsRestart;
static void ConfigDbProvider()
{
var urlKey = RuntimeInformation.RuntimeIdentifier;
@ -441,6 +452,7 @@ namespace UMC.Host
}
static void StartUp(string path)
{
IsRestart = true;
Register();
if (String.IsNullOrEmpty(path) == false)
{
@ -449,7 +461,6 @@ namespace UMC.Host
File.WriteAllText(UMC.Data.Utility.MapPath($".lock"), $"{{\"Id\":\"{System.Diagnostics.Process.GetCurrentProcess().Id}\"}}");
// HotCache.Namespace("UMC.Proxy.Entities");
UMC.Activities.DataFactory.Instance();
UMC.Proxy.DataFactory.Instance();
UMC.Data.DataFactory.Instance();

Loading…
Cancel
Save