From 4bbc48c9f82aff37d01cc6f17bef5a0e46620630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Tue, 23 Nov 2021 16:23:47 +0800 Subject: [PATCH] add using --- FastGithub.HttpServer/TcpReverseProxyHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FastGithub.HttpServer/TcpReverseProxyHandler.cs b/FastGithub.HttpServer/TcpReverseProxyHandler.cs index a0b1217..91229f0 100644 --- a/FastGithub.HttpServer/TcpReverseProxyHandler.cs +++ b/FastGithub.HttpServer/TcpReverseProxyHandler.cs @@ -36,7 +36,7 @@ namespace FastGithub.HttpServer /// public override async Task OnConnectedAsync(ConnectionContext context) { - var targetStream = await this.CreateConnectionAsync(); + using var targetStream = await this.CreateConnectionAsync(); var task1 = targetStream.CopyToAsync(context.Transport.Output); var task2 = context.Transport.Input.CopyToAsync(targetStream); await Task.WhenAny(task1, task2);