Skip to content

Do not check first byte before handshake#5415

Closed
Forgind wants to merge 5 commits into
dotnet:masterfrom
Forgind:uncheck-bytes
Closed

Do not check first byte before handshake#5415
Forgind wants to merge 5 commits into
dotnet:masterfrom
Forgind:uncheck-bytes

Conversation

@Forgind
Copy link
Copy Markdown
Contributor

@Forgind Forgind commented Jun 9, 2020

Related to dotnet/runtime#37333. This is an alternate (and, perhaps, better) way to resolve the problem.

Comment thread src/Shared/NodeEndpointOutOfProcBase.cs Outdated
Co-authored-by: Rainer Sigwald <raines@microsoft.com>
@rainersigwald rainersigwald added this to the MSBuild 16.7 Preview 4 milestone Jun 12, 2020
@rainersigwald rainersigwald added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jun 12, 2020
/// If specified, leading byte matches one in the supplied array if any, returns rejection byte and throws IOException.
/// </summary>
internal static long ReadLongForHandshake(this PipeStream stream, byte[] leadingBytesToReject,
internal static long ReadLongForHandshake(this PipeStream stream,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this handshake has caused some pain, maybe consider in the exceptions (like the one below) including the hex form of the bytes that were received (and possibly what was expected, if it was different)

@rainersigwald
Copy link
Copy Markdown
Member

Is this still a good idea or should we just skip it in favor of the "just send components" approach we discussed in #5439?

@Forgind
Copy link
Copy Markdown
Contributor Author

Forgind commented Jun 24, 2020

I'd vote for taking this now until I've finished that change. The handshake is calculated pretty early, so it's taking some time to string through the new struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants