I should not write code after midnight

This commit is contained in:
Mikko Ahlroth 2024-07-19 00:12:55 +03:00
parent 739467a6a3
commit 14fd260536

View file

@ -151,7 +151,7 @@ class Connection {
this.lastActivity = hrtime.bigint();
this.idleInterval = setInterval(() => {
const now = hrtime.bigint();
const diff = (now - this.lastActivity) / 1_000_000;
const diff = (now - this.lastActivity) / 1_000_000n;
if (diff > IDLE_TIMEOUT) {
clearInterval(this.idleInterval);
this.onIdleTimeout();