Skip to content

fix validation error propagation#221

Merged
artemredkin merged 4 commits into
swift-server:masterfrom
artemredkin:fix_validation_error_propagation
May 20, 2020
Merged

fix validation error propagation#221
artemredkin merged 4 commits into
swift-server:masterfrom
artemredkin:fix_validation_error_propagation

Conversation

@artemredkin

Copy link
Copy Markdown
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

@weissi weissi left a comment

Copy link
Copy Markdown
Contributor

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