From 4beb0366633e2819262a6863db88c3e992a1a9eb Mon Sep 17 00:00:00 2001 From: jholdstock Date: Thu, 19 May 2022 07:56:58 +0100 Subject: [PATCH] rpc: Use context.TODO instead of .Background --- rpc/dcrd.go | 2 +- rpc/dcrwallet.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpc/dcrd.go b/rpc/dcrd.go index f6eafeb..224b07a 100644 --- a/rpc/dcrd.go +++ b/rpc/dcrd.go @@ -59,7 +59,7 @@ func (d *DcrdConnect) Close() { // Client creates a new DcrdRPC client instance. Returns an error if dialing // dcrd fails or if dcrd is misconfigured. func (d *DcrdConnect) Client() (*DcrdRPC, string, error) { - ctx := context.Background() + ctx := context.TODO() c, newConnection, err := d.client.dial(ctx) if err != nil { return nil, d.client.addr, fmt.Errorf("dcrd connection error: %w", err) diff --git a/rpc/dcrwallet.go b/rpc/dcrwallet.go index fa15895..f423e6c 100644 --- a/rpc/dcrwallet.go +++ b/rpc/dcrwallet.go @@ -53,7 +53,7 @@ func (w *WalletConnect) Close() { // increments a count of failed connections if a connection cannot be // established, or if the wallet is misconfigured. func (w *WalletConnect) Clients() ([]*WalletRPC, []string) { - ctx := context.Background() + ctx := context.TODO() walletClients := make([]*WalletRPC, 0) failedConnections := make([]string, 0)