Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update src/node_http_parser.cc
Co-Authored-By: Anna Henningsen <github@addaleax.net>
  • Loading branch information
OrKoN and addaleax authored Mar 30, 2020
commit 9536c1b3c7fbf875881a7808f2a4863686c027c5
4 changes: 2 additions & 2 deletions src/node_http_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ class Parser : public AsyncWrap, public StreamListener {

// check header parsing time
if (header_parsing_start_time_ != 0 && headers_timeout_ != 0) {
auto now = uv_hrtime();
auto parsing_time = (now - header_parsing_start_time_) / 1e6;
uint64_t now = uv_hrtime();
uint64_t parsing_time = (now - header_parsing_start_time_) / 1e6;

if (parsing_time > headers_timeout_) {
Local<Value> cb =
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

is there a good way to avoid having an extra callback here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@OrKoN I don’t think so. But if it only fires in the timeout case, that should be okay.

Expand Down