From e4d9551a6ae84ca377fb737665a282809eccd35a Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 22 Feb 2022 13:14:48 +0800 Subject: [PATCH] itest: check feeService against nil upon shutdown [skip ci] --- lntest/harness_net.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lntest/harness_net.go b/lntest/harness_net.go index 03faf9e7c..65bb007f7 100644 --- a/lntest/harness_net.go +++ b/lntest/harness_net.go @@ -266,7 +266,11 @@ func (n *NetworkHarness) Stop() { close(n.lndErrorChan) n.cancel() - n.feeService.stop() + // feeService may not be created. For instance, running a non-exist + // test case. + if n.feeService != nil { + n.feeService.stop() + } } // extraArgsEtcd returns extra args for configuring LND to use an external etcd