This commit is contained in:
Ben Wilson 2024-01-15 20:04:26 -05:00
parent fc767fa770
commit bbc14e2272

View File

@ -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;
}