Skip to content

Commit

Permalink
http2: fix ping duration calculation
Browse files Browse the repository at this point in the history
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 committed Apr 16, 2018
1 parent e85c20b commit a890864
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 @@ -2617,8 +2617,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 a890864

Please sign in to comment.