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: make logError aware of bytesWritten #40

Merged
merged 1 commit into from
Sep 9, 2023
Merged

fix: make logError aware of bytesWritten #40

merged 1 commit into from
Sep 9, 2023

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Sep 9, 2023

Comes from noting this in logs:

Sep 09 14:01:16 fletcher frisbii[2505007]: 2023/09/09 14:01:16 http: superfluous response.WriteHeader call from github.com/ipld/frisbii.(*LoggingResponseWriter).WriteHeader (logmiddlware.go:105)

which I believe comes from the StreamCar error going through to logError which writes a header regardless of what has happened; this pulls the bytesWrittenCh logic into logError and makes it the place that handles bytesWritten or noBytesWritten states, including unclean termination if necessary.

@rvagg rvagg merged commit e1792c3 into master Sep 9, 2023
7 checks passed
@rvagg rvagg deleted the rvagg/log-err branch September 9, 2023 04:12
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.

1 participant