File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -592,14 +592,18 @@ function enumerateWorkerStats(){
592592 if ( activeWorkers [ poolID ] . hasOwnProperty ( workerID ) ) {
593593 let workerData = activeWorkers [ poolID ] [ workerID ] ;
594594 if ( typeof workerData !== 'undefined' ) {
595- if ( workerData . lastContact < ( ( Math . floor ( ( Date . now ( ) ) / 1000 ) - 120 ) ) ) {
595+ try {
596+ if ( workerData . lastContact < ( ( Math . floor ( ( Date . now ( ) ) / 1000 ) - 120 ) ) ) {
597+ delete activeWorkers [ poolID ] [ workerID ] ;
598+ continue ;
599+ }
600+ stats . miners += 1 ;
601+ stats . hashes += workerData . hashes ;
602+ stats . hashRate += workerData . avgSpeed ;
603+ stats . diff += workerData . diff ;
604+ } catch ( err ) {
596605 delete activeWorkers [ poolID ] [ workerID ] ;
597- continue ;
598606 }
599- stats . miners += 1 ;
600- stats . hashes += workerData . hashes ;
601- stats . hashRate += workerData . avgSpeed ;
602- stats . diff += workerData . diff ;
603607 } else {
604608 delete activeWorkers [ poolID ] [ workerID ] ;
605609 }
You can’t perform that action at this time.
0 commit comments