From bbc14e22721ad18c59e7463fc3bd1ef44b5c9982 Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Mon, 15 Jan 2024 20:04:26 -0500 Subject: [PATCH] bug --- src/models/StratumV1Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/StratumV1Client.ts b/src/models/StratumV1Client.ts index d04e098..6bfb53a 100644 --- a/src/models/StratumV1Client.ts +++ b/src/models/StratumV1Client.ts @@ -509,7 +509,7 @@ export class StratumV1Client { await this.statistics.addShares(this.sessionDifficulty); const now = new Date(); // only update every minute - if (now.getTime() - this.entity.updatedAt.getTime() > 1000 * 60) { + if (this.entity.updatedAt == null || now.getTime() - this.entity.updatedAt.getTime() > 1000 * 60) { await this.clientService.heartbeat(this.entity.address, this.entity.clientName, this.entity.sessionId, this.hashRate, now); this.entity.updatedAt = now; }