Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler server fixes #72716

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/Compilers/Core/CommandLine/BuildProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,8 @@ public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationTo
throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
}

cancellationToken.ThrowIfCancellationRequested();

// Read the full request
var requestBuffer = new byte[length];
await ReadAllAsync(inStream, requestBuffer, length, cancellationToken).ConfigureAwait(false);

cancellationToken.ThrowIfCancellationRequested();

// Parse the request into the Request data structure.
using var reader = new BinaryReader(new MemoryStream(requestBuffer), Encoding.Unicode);
using var reader = new BinaryReader(inStream, Encoding.Unicode);
var requestId = reader.ReadString();
var language = (RequestLanguage)reader.ReadUInt32();
var compilerHash = reader.ReadString();
Expand Down