mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-29 03:02:22 +01:00
nerdminer
This commit is contained in:
parent
c45d666cde
commit
b9dc52ebc7
@ -294,8 +294,8 @@ export class StratumV1Client extends EasyUnsubscribe {
|
||||
}
|
||||
const now = Date.now();
|
||||
const diffSeconds = (now - time.getTime()) / 1000;
|
||||
// five minutes
|
||||
if (diffSeconds > 5 * 60) {
|
||||
// fifteen minutes
|
||||
if (diffSeconds > 15 * 60) {
|
||||
console.log('Watchdog ending session');
|
||||
this.promiseSocket.socket.emit('end', true);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { ClientEntity } from '../ORM/client/client.entity';
|
||||
|
||||
const CACHE_SIZE = 30;
|
||||
const TARGET_SUBMISSION_PER_SECOND = 10;
|
||||
const MIN_DIFF = 0.000001;
|
||||
const MIN_DIFF = 1e-9;
|
||||
export class StratumV1ClientStatistics {
|
||||
|
||||
private submissionCacheStart: Date;
|
||||
|
@ -76,8 +76,7 @@ export class StratumV1Service implements OnModuleInit {
|
||||
await this.clientService.delete(client.extraNonceAndSessionId);
|
||||
|
||||
const clientCount = await this.clientService.connectedClientCount();
|
||||
console.log(`Socket error:`, error);
|
||||
console.log(`Client disconnected: ${promiseSocket.socket.remoteAddress}, ${client.extraNonceAndSessionId}, ${clientCount} total clients`);
|
||||
console.log(`Client disconnected, socket error: ${promiseSocket.socket.remoteAddress}, ${client.extraNonceAndSessionId}, ${clientCount} total clients`);
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user