From c824f2dc74cde3ee6ee732986c92bbe5b61fdc8b Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Wed, 25 Jun 2014 12:01:40 -0500 Subject: [PATCH] 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. --- rpcclient.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rpcclient.go b/rpcclient.go index f0d562d..d331796 100644 --- a/rpcclient.go +++ b/rpcclient.go @@ -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: