Skip to content

Commit

Permalink
Fix latency test
Browse files Browse the repository at this point in the history
  • Loading branch information
snowNnik committed Oct 26, 2024
1 parent 041d22e commit 5ba9add
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/network/RuntimeComms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export default class RuntimeComms {
this.#tcpDisconnected = true; // Don't reconnect
if (this.#pingInterval) {
clearInterval(this.#pingInterval);
this.#pingInterval = null;
}
this.#disconnectTcp();
}
Expand Down Expand Up @@ -273,7 +274,7 @@ export default class RuntimeComms {
break;
case MsgType.TIME_STAMPS:
this.#commsListener.onReceiveLatency(
(Date.now() - Number(protos.TimeStamps.decode(data))) / 2,
(Date.now() - Number(protos.TimeStamps.decode(data).dawnTimestamp)) / 2,
);
break;
// case MsgType.CHALLENGE_DATA:
Expand Down

0 comments on commit 5ba9add

Please sign in to comment.