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() {
|
||||
if !c.Client.Disconnected() {
|
||||
log.Warn("Disconnecting chain server client connection")
|
||||
c.Client.Shutdown()
|
||||
}
|
||||
log.Warn("Disconnecting chain server client connection")
|
||||
c.Client.Shutdown()
|
||||
|
||||
select {
|
||||
case <-c.quit:
|
||||
|
|
Loading…
Add table
Reference in a new issue