Skip to content
Merged
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 in sourcode: commented the change
  • Loading branch information
franciszek-koltuniuk-red committed Jun 7, 2023
commit fc3c8548dfe5298dd715c22e8de4637c8535401d
5 changes: 5 additions & 0 deletions src/node_http_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,11 @@ void ConnectionsList::Expired(const FunctionCallbackInfo<Value>& args) {
std::swap(headers_timeout, request_timeout);
}

// On IoT or embedded devices the uv_hrtime() may return the timestamp
// that is smaller than configured timeout for headers or request
// to prevent subtracting two unsigned integers
// that can yield incorrect results we should check
// if the 'now' is bigger than the timeout for headers or request
const uint64_t now = uv_hrtime();
const uint64_t headers_deadline =
(headers_timeout > 0 && now > headers_timeout) ? now - headers_timeout
Expand Down