This commit is contained in:
智能大石头 2025-01-14 01:46:10 +08:00
parent db867557be
commit 537a982f41
1 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ public class RedisClient : DisposeBase
//var ms = new BufferedStream(ns); //var ms = new BufferedStream(ns);
var ms = ns; var ms = ns;
using var pk = new OwnerPacket(MAX_POOL_SIZE); using var pk = new OwnerPacket(8192);
var n = ms.Read(pk.Buffer, pk.Offset, pk.Length); var n = ms.Read(pk.Buffer, pk.Offset, pk.Length);
if (n <= 0) return []; if (n <= 0) return [];
@ -333,7 +333,7 @@ public class RedisClient : DisposeBase
protected virtual async Task<IList<Object?>> GetResponseAsync(Stream ns, Int32 count, CancellationToken cancellationToken = default) protected virtual async Task<IList<Object?>> GetResponseAsync(Stream ns, Int32 count, CancellationToken cancellationToken = default)
{ {
var ms = ns; var ms = ns;
using var pk = new OwnerPacket(MAX_POOL_SIZE); using var pk = new OwnerPacket(8192);
// 取巧进行异步操作,只要异步读取到第一个字节,后续同步读取 // 取巧进行异步操作,只要异步读取到第一个字节,后续同步读取
if (cancellationToken == CancellationToken.None) if (cancellationToken == CancellationToken.None)