mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
error logging
This commit is contained in:
@@ -76,6 +76,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
await this.handleMessage(m);
|
await this.handleMessage(m);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.promiseSocket.socket.emit('end', true);
|
this.promiseSocket.socket.emit('end', true);
|
||||||
|
console.error(e);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -99,6 +100,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Invalid JSON");
|
console.log("Invalid JSON");
|
||||||
this.promiseSocket.socket.emit('end', true);
|
this.promiseSocket.socket.emit('end', true);
|
||||||
|
console.error(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,6 +295,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
await this.watchdog();
|
await this.watchdog();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.promiseSocket.socket.emit('end', true);
|
this.promiseSocket.socket.emit('end', true);
|
||||||
|
console.error(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -437,6 +440,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
await this.promiseSocket.write(err);
|
await this.promiseSocket.write(err);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.promiseSocket.socket.emit('end', true);
|
this.promiseSocket.socket.emit('end', true);
|
||||||
|
console.error(e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user