From 0e607c193961d98a58b8d96d71303ed6807cb240 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 24 Apr 2016 12:39:43 -0700 Subject: [PATCH] lnwallet: during shutdown properly wait for all goroutines to exit --- lnwallet/wallet.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 005e41dff..7bd38b170 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -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()