Skip to content

Commit 5862d03

Browse files
jasnellBethGriggs
authored andcommitted
http2: fix ping duration calculation
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]>
1 parent fe3836a commit 5862d03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_http2.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2832,8 +2832,8 @@ void Http2Session::Http2Ping::Send(uint8_t* payload) {
28322832
}
28332833

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

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

0 commit comments

Comments
 (0)