lnwallet: during shutdown properly wait for all goroutines to exit

This commit is contained in:
Olaoluwa Osuntokun 2016-04-24 12:39:43 -07:00
parent 2b047ff56c
commit 0e607c1939

@ -385,7 +385,10 @@ func (l *LightningWallet) Shutdown() error {
return nil
}
// Signal the underlying wallet controller to shutdown, waiting until
// all active goroutines have been shutdown.
l.Stop()
l.WaitForShutdown()
l.rpc.Shutdown()