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:
Josh Rickmar 2014-06-25 12:01:40 -05:00
parent c0e77b3e2d
commit c824f2dc74

View file

@ -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: