From 73660592eb655b6b2bdb076546e5e2dd687c715a Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 23 Sep 2025 11:55:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(TcpCore):=20=E4=BF=AE=E5=A4=8D=E5=8F=91?= =?UTF-8?q?=E9=80=81=E6=95=B0=E6=8D=AE=E6=9C=AA=E5=88=87=E7=89=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(TcpCore): 修复发送数据未切片问题 * refactor: 精简代码使用 range 语法 --- src/TouchSocket/Components/Core/TcpCore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TouchSocket/Components/Core/TcpCore.cs b/src/TouchSocket/Components/Core/TcpCore.cs index aebff800c..1b627cd97 100644 --- a/src/TouchSocket/Components/Core/TcpCore.cs +++ b/src/TouchSocket/Components/Core/TcpCore.cs @@ -420,7 +420,7 @@ internal sealed class TcpCore : DisposableObject var offset = 0; while (length > 0 && !this.m_cancellationToken.IsCancellationRequested) { - var result = await this.m_socketSender.SendAsync(this.m_socket, memory).ConfigureAwait(EasyTask.ContinueOnCapturedContext); + var result = await this.m_socketSender.SendAsync(this.m_socket, memory[offset..]).ConfigureAwait(EasyTask.ContinueOnCapturedContext); if (result.SocketError != null) { throw result.SocketError;