go
go copied to clipboard
exp/lighthorizon: Add the ability to gracefully shut down.
Reference: https://github.com/stellar/go/pull/4615#discussion_r982765560.
We should add signal handling to both the main service and other background goroutines. As it stands today, if you Ctrl+C the web server while it's doing normal caching or during its cache preload phase, you risk cache corruption because a ledger would be partially-written to disk.