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

Record null responseTime when request is aborted #618

Merged
merged 2 commits into from Sep 21, 2019

Conversation

@rankida
Copy link
Contributor

rankida commented Aug 9, 2019

As the hapi API docs say here the info.responded can be 0 in some cases such as aborted requests.

Just now good will output responseTime of -Date.now().

This PR changes this to set responseTime to null to better reflect the 0 responded value.

@rahaack

This comment has been minimized.

Copy link

rahaack commented Aug 12, 2019

Should request.info.responded just be replaced with request.info.completed?

From the hapi 18 release notes:
image

@rankida

This comment has been minimized.

Copy link
Contributor Author

rankida commented Aug 12, 2019

Seems like a sensible suggestion

@hueniverse hueniverse merged commit 450b4c1 into hapijs:master Sep 21, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@hueniverse hueniverse self-assigned this Sep 21, 2019
@hueniverse hueniverse added the bug label Sep 21, 2019
@hueniverse hueniverse added this to the 8.2.3 milestone Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.