From 02780363c80a7e578e6547fae57c0227788497c6 Mon Sep 17 00:00:00 2001 From: SpringHgui <740360381@qq.com> Date: Mon, 16 Dec 2019 20:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastTunnel.Core/Logger/ConsoleLogger.cs | 2 +- FastTunnel.Core/Server/SuiDaoServer.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/FastTunnel.Core/Logger/ConsoleLogger.cs b/FastTunnel.Core/Logger/ConsoleLogger.cs index 4a6ab78..bd71c95 100644 --- a/FastTunnel.Core/Logger/ConsoleLogger.cs +++ b/FastTunnel.Core/Logger/ConsoleLogger.cs @@ -8,7 +8,7 @@ namespace FastTunnel.Core.Logger { public void Debug(string msg) { - Console.WriteLine(string.Format("Debug - {0}", msg)); + Console.WriteLine(string.Format("Debu - {0}", msg)); } public void Error(string msg) diff --git a/FastTunnel.Core/Server/SuiDaoServer.cs b/FastTunnel.Core/Server/SuiDaoServer.cs index 95062c5..06b2780 100644 --- a/FastTunnel.Core/Server/SuiDaoServer.cs +++ b/FastTunnel.Core/Server/SuiDaoServer.cs @@ -104,9 +104,9 @@ namespace FastTunnel.Core.Server _logger.Debug($"Host: {domain}"); WebInfo web; - if (WebList.TryGetValue(domain, out web)) + if (!WebList.TryGetValue(domain, out web)) { - _logger.Error($"客户端不存在:{domain}"); + _logger.Error($"客户端不存在:'{domain}'"); return; } @@ -162,17 +162,17 @@ namespace FastTunnel.Core.Server { foreach (var item in requet.WebList) { - var key = $"{item.SubDomain }.{serverSettings.Domain}"; + var key = $"{item.SubDomain}.{serverSettings.Domain}".Trim(); if (WebList.ContainsKey(key)) { - _logger.Debug($"renew domain {key}"); + _logger.Debug($"renew domain '{key}'"); WebList.Remove(key); WebList.Add(key, new WebInfo { Socket = client, WebConfig = item }); } else { - _logger.Debug($"new domain {key}"); + _logger.Debug($"new domain '{key}'"); WebList.Add(key, new WebInfo { Socket = client, WebConfig = item }); } }