Skip to content

Commit 10b880f

Browse files
committed
修复一个发送的数据大于50KB时可能会阻塞的严重BUG
1 parent ca7d332 commit 10b880f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Quick.Protocol/QpChannel_Send.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private async Task writePackageBuffer(PipeReader currentReader, QpPackageType pa
127127
packageBodyBuffer.CopyTo(bodyMemory.Span);
128128
writer.Advance(packageBodyLength);
129129
}
130-
await writer.FlushAsync();
130+
_ = writer.FlushAsync();
131131

132132
//发送
133133
var reader = sendRawPipe.Reader;
@@ -244,7 +244,7 @@ await UseSendPipe(QpPackageType.Notice, async pipe =>
244244
bodyLength += byteCount;
245245
}
246246
}
247-
await writer.FlushAsync();
247+
_ = writer.FlushAsync();
248248
if (LogUtils.LogNotice)
249249
LogUtils.Log("{0}: [Send-NoticePackage]Type:{1},Content:{2}", DateTime.Now, typeName, LogUtils.LogContent ? content : LogUtils.NOT_SHOW_CONTENT_MESSAGE);
250250
return bodyLength;
@@ -290,8 +290,7 @@ await UseSendPipe(QpPackageType.CommandRequest, async pipe =>
290290
writer.Advance(contentLength);
291291
bodyLength += contentLength;
292292
}
293-
await writer.FlushAsync();
294-
293+
_ = writer.FlushAsync();
295294
if (LogUtils.LogCommand)
296295
LogUtils.Log("{0}: [Send-CommandRequestPackage]CommandId:{1},Type:{2},Content:{3}", DateTime.Now, commandId, typeName, LogUtils.LogContent ? content : LogUtils.NOT_SHOW_CONTENT_MESSAGE);
297296

Test/Pipeline/PipelineClient/PipelineClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6+
<RollForward>Major</RollForward>
67
<IsPackable>false</IsPackable>
78
</PropertyGroup>
89

Test/Pipeline/PipelineServer/PipelineServer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net8.0</TargetFramework>
6+
<RollForward>Major</RollForward>
67
<IsPackable>false</IsPackable>
78
</PropertyGroup>
89

0 commit comments

Comments
 (0)