Skip to content

Commit

Permalink
[修复]1. 修复如果收到空消息的时候,需要收到其他消息的时候才会触发解析的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Sep 9, 2024
1 parent e80a3b6 commit 59a8120
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void ReceiveCallback(IAsyncResult asyncResult)
throw;
}

if (bytesReceived <= 0 && !PReceiveState.IsEmptyBody)
if (bytesReceived <= 0)
{
Close();
return;
Expand All @@ -150,6 +150,13 @@ private void ReceiveCallback(IAsyncResult asyncResult)
else
{
processSuccess = ProcessPackHeader();
if (PReceiveState.IsEmptyBody)
{
// 如果是空消息,直接返回
ProcessPackBody();
ReceiveAsync();
return;
}
}

if (processSuccess)
Expand Down

0 comments on commit 59a8120

Please sign in to comment.