orion-server
orion-server copied to clipboard
shutdown of the server
There are three ways to perform a shutdown:
- Just kill the main program abruptly which would kill all goroutines as well.
- Finish all the pending transactions, blocks before shutting down the peer but no new connections would be allowed.
- Stop all goroutines immediately and then the server.
For (1), just a CTR + C is good enough. For (2) and (3), we need to add code to support the graceful shutdown while (1) is more work than (2).