-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Prevented duplicate "request completed" logs #63
Prevented duplicate "request completed" logs #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding a test case?
Co-authored-by: Manuel Spigolon <[email protected]>
Co-authored-by: Manuel Spigolon <[email protected]>
Hi @Eomm, thanks for taking a look at this! I added a few tests cases to verify the logging is correct. Let me know if you need anything else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✌️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@kibertoad would you like to land and release this? |
Hey, just checking in on when this is planned to be merged and released. Thanks! |
kind reminder @kibertoad |
Sorry, missed this. On it. |
Released in 1.2.1 |
I noticed that two "request completed" logs were being printed by my Fastify instance following the "incoming request" log. After setting some breakpoints, I narrowed down the cause of this behavior to this plugin, specifically the
onResponse
hook controlled by thedisposeOnResponse
option. Removing thereturn
from the hook callback stopped the extra log from being printed. Alternatively, using async/await will also fix this problem.Checklist
npm run test
andnpm run benchmark
and the Code of conduct