mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 22:25:24 +01:00
server: properly set stopping atomic var upon shutdown
This commit is contained in:
parent
d6d87e12fe
commit
dff7fba40a
1 changed files with 1 additions and 1 deletions
|
@ -1298,7 +1298,7 @@ func (s *server) Start() error {
|
|||
// NOTE: This function is safe for concurrent access.
|
||||
func (s *server) Stop() error {
|
||||
s.stop.Do(func() {
|
||||
atomic.LoadInt32(&s.stopping)
|
||||
atomic.StoreInt32(&s.stopping, 1)
|
||||
|
||||
close(s.quit)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue