Skip to content

Commit

Permalink
cloud roundTrip time should be for both directions
Browse files Browse the repository at this point in the history
  • Loading branch information
jwetzell committed Jun 13, 2024
1 parent 4b5dd01 commit 74043f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/protocols/cloud-protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CloudProtocol extends EventEmitter {
if (this.socket) {
const timeSent = Date.now();
this.socket.emit('ping', (serverTimestamp) => {
this.roundtripMs = serverTimestamp - Date.now();
this.roundtripMs = serverTimestamp - timeSent;
});
}
}, 5000);
Expand Down

0 comments on commit 74043f6

Please sign in to comment.