Skip to content

Close local proxy conn if middleware errors#18242

Merged
GavinFrazar merged 14 commits into
masterfrom
gavinfrazar/close-local-proxy-conn-on-error
Nov 16, 2022
Merged

Close local proxy conn if middleware errors#18242
GavinFrazar merged 14 commits into
masterfrom
gavinfrazar/close-local-proxy-conn-on-error

Conversation

@GavinFrazar
Copy link
Copy Markdown
Contributor

Small fix, this PR just closes the local proxy connection if the middleware errors for whatever reason. This prevents a client from waiting on a connection. See this discussion: #16958 (comment)

Added a test with a read deadline to verify that clients do not hang when the middleware has some error.

Comment thread lib/srv/alpnproxy/local_proxy.go Outdated
@GavinFrazar GavinFrazar enabled auto-merge (squash) November 8, 2022 17:59
Comment thread lib/srv/alpnproxy/local_proxy_test.go Outdated
Comment thread lib/srv/alpnproxy/local_proxy.go Outdated
Comment thread lib/srv/alpnproxy/local_proxy_test.go Outdated
Comment thread lib/srv/alpnproxy/local_proxy_test.go Outdated
Comment thread lib/srv/alpnproxy/local_proxy_test.go
GavinFrazar and others added 5 commits November 8, 2022 13:06
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Comment thread lib/srv/alpnproxy/local_proxy.go Outdated
Comment thread lib/srv/alpnproxy/local_proxy_test.go
GavinFrazar and others added 3 commits November 9, 2022 20:03
@GavinFrazar
Copy link
Copy Markdown
Contributor Author

@rosstimothy need your approval for group 1 reviewers

Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

Apologies this PR wasn't showing up in my waiting to be reviewed queue

@GavinFrazar GavinFrazar merged commit e20173f into master Nov 16, 2022
@GavinFrazar GavinFrazar deleted the gavinfrazar/close-local-proxy-conn-on-error branch November 16, 2022 17:23
GavinFrazar added a commit that referenced this pull request Nov 16, 2022
* Close connection on middleware error after accepting connection in local proxy

* add comment
GavinFrazar added a commit that referenced this pull request Nov 17, 2022
* Close connection on middleware error after accepting connection in local proxy

* add comment
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.

5 participants