diff --git a/NetLib/HaoYueNet.ServerNetwork/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs b/NetLib/HaoYueNet.ServerNetwork/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs index fc30b71..26dba2b 100644 --- a/NetLib/HaoYueNet.ServerNetwork/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs +++ b/NetLib/HaoYueNet.ServerNetwork/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs @@ -414,6 +414,10 @@ namespace HaoYueNet.ServerNetwork } else { + //尝试性,清理数据 + token.memoryStream.SetLength(0); + token.memoryStream.Seek(0, SeekOrigin.Begin); + CloseClientSocket(e); } } diff --git a/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs b/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs index 4dd6f77..4eb1c00 100644 --- a/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs +++ b/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/SourceMode/TcpSaeaServer_SourceMode.cs @@ -1,6 +1,7 @@ //using HunterProtobufCore; using System; using System.Collections.Generic; +using System.IO; using System.Net; using System.Net.Sockets; using System.Threading; @@ -416,6 +417,9 @@ namespace HaoYueNet.ServerNetwork.Standard2 } else { + //尝试性,清理数据 + token.memoryStream.SetLength(0); + token.memoryStream.Seek(0, SeekOrigin.Begin); CloseClientSocket(e); } } diff --git a/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/TcpSaeaServer.cs b/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/TcpSaeaServer.cs index be23701..54b7675 100644 --- a/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/TcpSaeaServer.cs +++ b/NetLib_Standard2/HaoYueNet.ServerNetwork.Standard2/NetWork/TcpSaeaServer.cs @@ -457,6 +457,9 @@ namespace HaoYueNet.ServerNetwork.Standard2 } else { + //尝试性,清理数据 + token.memoryStream.SetLength(0); + token.memoryStream.Seek(0, SeekOrigin.Begin); CloseClientSocket(e); } }