planetarium / NineChronicles.Bridge

A bridge implementation for the NineChronicles planets
3 stars 3 forks source link

Gracefully shutdown by calling `Monitor.stop()` #39

Closed moreal closed 9 months ago

moreal commented 9 months ago

The below logs often show when stopping bridge. I think it will be okay when it calls Monitor.stop for gracefully-shutdown.

[AssetsTransferredMonitor] Skip. lastestBlockNumber: 185173 / tip: 185173
^CShutdownHandler.shutdown called.

/Users/moreal/github/planetarium/NineChronicles.Bridge/src/observers/asset-transferred-observer.ts:25
        const { events } = data;
                ^

TypeError: Cannot destructure property 'events' of 'data' as it is undefined.
    at AssetTransferredObserver.notify (/path/to/NineChronicles.Bridge/src/observers/asset-transferred-observer.ts:25:17)
    at AssetsTransferredMonitor.startMonitoring (/path/to/NineChronicles.Bridge/src/monitors/index.ts:42:32)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at listOnTimeout (node:internal/timers:540:9)
    at process.processTimers (node:internal/timers:514:7)

Node.js v20.4.0