getAlby / lndhub.go

Accounting wrapper for the Lightning Network. It provides separate accounts for end-users. (LndHub compatible API written in Go)
GNU General Public License v3.0
86 stars 23 forks source link

Feature/graceful shutdown #291

Closed kiwiidb closed 1 year ago

kiwiidb commented 1 year ago

Fixes #285 Based on this article.

We need to shutdown a maximum of 3 servers:

Other than that there are the background routines:

These are also canceled by canceling the backgroundCtx context. The waitgroup waits until all processes are finished before the program is exited.