I should not write code after midnight
This commit is contained in:
parent
739467a6a3
commit
14fd260536
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue