屏蔽一个异常

This commit is contained in:
Gui.H 2022-11-11 21:41:23 +08:00
parent 4f69ae3e96
commit 29ce9731ec

View File

@ -29,7 +29,7 @@ namespace FastTunnel.Core.Forwarder.MiddleWare
public async Task Handle(HttpContext context, Func<Task> next)
{
Interlocked.Increment(ref connectionCount);
try
{
if (context.Request.Method != "PROXY")
@ -78,6 +78,7 @@ namespace FastTunnel.Core.Forwarder.MiddleWare
await closedAwaiter.Task.WaitAsync(cts.Token);
logger.LogDebug($"[PROXY]:Closed {requestId}");
}
catch (TaskCanceledException) { }
catch (Exception ex)
{
logger.LogError(ex);