Skip to content

Commit

Permalink
http2: fix ping duration calculation
Browse files Browse the repository at this point in the history
Backport-PR-URL: #22850
PR-URL: #19956
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
jasnell authored and BethGriggs committed Oct 16, 2018
1 parent fe3836a commit 5862d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2832,8 +2832,8 @@ void Http2Session::Http2Ping::Send(uint8_t* payload) {
}

void Http2Session::Http2Ping::Done(bool ack, const uint8_t* payload) {
session_->statistics_.ping_rtt = (uv_hrtime() - startTime_);
double duration = (session_->statistics_.ping_rtt - startTime_) / 1e6;
session_->statistics_.ping_rtt = uv_hrtime() - startTime_;
double duration = session_->statistics_.ping_rtt / 1e6;

Local<Value> buf = Undefined(env()->isolate());
if (payload != nullptr) {
Expand Down

0 comments on commit 5862d03

Please sign in to comment.