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

fix validation error propagation #221

Merged

Conversation

artemredkin
Copy link
Collaborator

Fixes request validation error propagation and use-after-shutdown, closes #217 and #220.

Motivation:
First issue is that validation errors are not passed to task fail methods. Second is that channel closed before connection is released from the pool, in this case clients will get wrong error (remoteConnectionClosed) and connection will be released twice, potentially trying to execute stuff on a shutdown event loop.

Modifications:

  1. use task failing method for error propagation
  2. close channel after connection was released

Result:
Error propagation is fixed.

@artemredkin artemredkin requested a review from weissi May 20, 2020 09:54
Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

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

Amazing, thank you!!

@artemredkin artemredkin merged commit ce82178 into swift-server:master May 20, 2020
@artemredkin artemredkin deleted the fix_validation_error_propagation branch May 20, 2020 10:50
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.

AHC can get completely stuck, swallowing errors
2 participants