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 healthcheck bug #1304

Merged
merged 2 commits into from
Jun 23, 2022
Merged

Conversation

mihaitodor
Copy link
Collaborator

Don't write the header and message twice if both input and output aren't connected.

With the current code, the following will pop up in the logs:

2022/06/21 23:10:14 http: superfluous response.WriteHeader call from github.com/benthosdev/benthos/v4/internal/stream.New.func2 (type.go:57)

Don't write the header and message twice if both input and output
aren't connected.
@mihaitodor mihaitodor requested a review from Jeffail June 21, 2022 22:11
@mihaitodor mihaitodor force-pushed the fix-healthcheck-bug branch 2 times, most recently from a69a05b to 8712630 Compare June 22, 2022 10:32
@Jeffail
Copy link
Collaborator

Jeffail commented Jun 23, 2022

Thanks @mihaitodor, if I remember right the dodgy code pathing here was because we wanted to print errors for both the input and output being unavailable at the same time when applicable. I might try and simplify it a little bit further.

@Jeffail Jeffail merged commit cb8394b into redpanda-data:main Jun 23, 2022
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