Skip to content

Commit

Permalink
Fix Keep-Alive being broken on .NET 8 (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat authored Jan 31, 2025
1 parent d0399b5 commit 0bc3bc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Engine/Internal/Protocol/Parser/RequestScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ internal async ValueTask<RequestToken> Next(RequestBuffer buffer, bool forceRead
}

// did not recognize any tokens, probably due to missing input data
if (!forceRead)
if (!forceRead && !buffer.Timeout)
{
return await Next(buffer, true, includeWhitespace);
}
Expand Down
4 changes: 4 additions & 0 deletions Engine/Internal/Protocol/RequestBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ internal RequestBuffer(PipeReader reader, NetworkConfiguration configuration)

internal bool ReadRequired => _Data == null || _Data.Value.IsEmpty;

internal bool Timeout { get; private set; }

#endregion

#region Functionality
Expand All @@ -67,6 +69,8 @@ internal RequestBuffer(PipeReader reader, NetworkConfiguration configuration)
Cancellation.Dispose();
Cancellation = null;

Timeout = true;

return null;
}
}
Expand Down

0 comments on commit 0bc3bc3

Please sign in to comment.