mirror of
https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
synced 2025-11-19 19:25:52 +00:00
Resubscribe on reconnect
This commit is contained in:
@@ -13,6 +13,8 @@ await createDirectory('store/xpop')
|
|||||||
|
|
||||||
process.env.NODES.split(',').map(h => h.trim())
|
process.env.NODES.split(',').map(h => h.trim())
|
||||||
.map(h => new XrplClient(h)).map(async c => {
|
.map(h => new XrplClient(h)).map(async c => {
|
||||||
|
|
||||||
|
const subscribe = async () => {
|
||||||
await c.ready()
|
await c.ready()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,4 +42,7 @@ process.env.NODES.split(',').map(h => h.trim())
|
|||||||
ledger,
|
ledger,
|
||||||
connection: c,
|
connection: c,
|
||||||
}))
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
c.on('online', () => subscribe())
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user