mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-11-19 19:25:52 +00:00
Add timeout-reconnecting & prevent multi-quit handler
This commit is contained in:
@@ -12,6 +12,10 @@ import 'wtfnode'
|
||||
import { lastLedger } from '../lib/onLedger.mjs'
|
||||
import { txCount } from '../lib/onTransaction.mjs'
|
||||
|
||||
let _health = {
|
||||
reconnectCount: -1,
|
||||
}
|
||||
|
||||
const telemetry = {
|
||||
host: null,
|
||||
proto: null,
|
||||
@@ -132,7 +136,8 @@ if (!wss) {
|
||||
uptime: new Date() - startDate,
|
||||
lastLedger: lastLedger ?? null,
|
||||
lastWsPushedLedger: lastWsPushedLedger ?? null,
|
||||
txCount: txCount ?? null,
|
||||
txCount: txCount ?? null,
|
||||
..._health,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
@@ -150,6 +155,7 @@ if (!wss) {
|
||||
lastLedger: lastLedger ?? null,
|
||||
lastWsPushedLedger: lastWsPushedLedger ?? null,
|
||||
txCount: txCount ?? null,
|
||||
..._health,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -232,4 +238,5 @@ const emit = _data => {
|
||||
|
||||
export {
|
||||
emit,
|
||||
_health,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user