内存流处理,完善

This commit is contained in:
sin365 2024-05-27 00:02:08 +08:00
parent 7f79e74599
commit 0323b616f4
3 changed files with 11 additions and 0 deletions

View File

@ -414,6 +414,10 @@ namespace HaoYueNet.ServerNetwork
}
else
{
//尝试性,清理数据
token.memoryStream.SetLength(0);
token.memoryStream.Seek(0, SeekOrigin.Begin);
CloseClientSocket(e);
}
}

View File

@ -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);
}
}

View File

@ -457,6 +457,9 @@ namespace HaoYueNet.ServerNetwork.Standard2
}
else
{
//尝试性,清理数据
token.memoryStream.SetLength(0);
token.memoryStream.Seek(0, SeekOrigin.Begin);
CloseClientSocket(e);
}
}