multi: wait for rpcclients shutdown to complete

We need to call `WaitForShutdown` after stopping the rpc clients of the
chain backends.
This commit is contained in:
yyforyongyu
2024-11-03 20:19:38 +08:00
parent 304c8df7b9
commit 523ecc0653
7 changed files with 8 additions and 4 deletions

View File

@@ -139,6 +139,7 @@ func (b *BitcoindNotifier) Stop() error {
// Shutdown the rpc client, this gracefully disconnects from bitcoind,
// and cleans up all related resources.
b.chainConn.Stop()
b.chainConn.WaitForShutdown()
close(b.quit)
b.wg.Wait()