mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-23 17:47:29 +00:00
Shutdown rpc client even if attempting reconnects.
Instead of checking whether the chain server client is currently connected (as opposed to in a reconnect loop), always shutdown the client connection so other rpc calls begin erroring.
This commit is contained in:
parent
c0e77b3e2d
commit
c824f2dc74
1 changed files with 2 additions and 4 deletions
|
@ -315,10 +315,8 @@ func (c *rpcClient) Start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *rpcClient) Stop() {
|
func (c *rpcClient) Stop() {
|
||||||
if !c.Client.Disconnected() {
|
log.Warn("Disconnecting chain server client connection")
|
||||||
log.Warn("Disconnecting chain server client connection")
|
c.Client.Shutdown()
|
||||||
c.Client.Shutdown()
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-c.quit:
|
case <-c.quit:
|
||||||
|
|
Loading…
Add table
Reference in a new issue