Skip to content

Commit a2117a1

Browse files
jasnellBridgeAR
authored andcommitted
http2: fix ping duration calculation
PR-URL: nodejs#19956 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent abd324a commit a2117a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_http2.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,8 +2728,8 @@ void Http2Session::Http2Ping::Send(uint8_t* payload) {
27282728
}
27292729

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

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

0 commit comments

Comments
 (0)