Skip to content

Commit

Permalink
solve client crash of KademliaTable.getValue
Browse files Browse the repository at this point in the history
  • Loading branch information
foufrix committed Nov 14, 2024
1 parent ad7a1a0 commit f500162
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,16 @@ const main = async () => {
log(`Started JSON RPC Server address=http://${rpcAddr}:${args.rpcPort}`)
}

process.on('SIGINT', async () => {
console.log('Caught close signal, shutting down...')
await portal.stop()
if (metricsServer?.listening === true) {
metricsServer.close()
}
process.exit()
process.on('uncaughtException', (err) => {
console.error('Uncaught Exception:', err)
process.on('SIGINT', async () => {
console.log('Caught close signal, shutting down...')
await portal.stop()
if (metricsServer?.listening === true) {
metricsServer.close()
}
process.exit()
})
})
}

Expand Down

0 comments on commit f500162

Please sign in to comment.