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

don't crash when client sends bad magic #12

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

weissi
Copy link
Member

@weissi weissi commented Aug 16, 2018

Motivation:

We shouldn't just crash if the client sends bad magic.

Changes:

Send an error through the pipeline instead of crashing on bad client
magic.

Result:

fewer crashes

@weissi weissi requested a review from Lukasa August 16, 2018 11:21
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

One minor note.

@@ -126,12 +136,13 @@ fileprivate class ReentrancyManager {
}

// Now we want to send some data. If this returns .continue, we want to spin
// around keep going. If this returns .complete, we can go ahead and flush.
if case .complete = body(.doOneWrite, ctx) {
// around keep going. If this returns .complete, we can go ahead and
Copy link
Contributor

Choose a reason for hiding this comment

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

You deleted a word from the comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

I must have discovered a new Xcode shortcut ;), sorry about that

@Lukasa
Copy link
Contributor

Lukasa commented Aug 16, 2018

This is also missing the linux tests.

@weissi weissi force-pushed the jw-dont-crash-on-bad-magic branch from 7329343 to 75624af Compare August 16, 2018 12:21
@Lukasa
Copy link
Contributor

Lukasa commented Aug 16, 2018

Cool, merge conflicts!

Motivation:

We shouldn't just crash if the client sends bad magic.

Changes:

Send an error through the pipeline instead of crashing on bad client
magic.

Result:

fewer crashes
@weissi weissi force-pushed the jw-dont-crash-on-bad-magic branch from 75624af to b23154c Compare August 16, 2018 13:27
@Lukasa Lukasa merged commit 346af5b into apple:master Aug 16, 2018
@weissi weissi deleted the jw-dont-crash-on-bad-magic branch August 16, 2018 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants