From fc82b351b83536f58d2918a893f69ca21ae51cee Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Tue, 2 Feb 2016 15:51:28 -0800 Subject: [PATCH] Use the server's address in debug logging, not the c.lastServer, which may be nil --- consul/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/client.go b/consul/client.go index 2e8ce9f03..e7155a144 100644 --- a/consul/client.go +++ b/consul/client.go @@ -413,7 +413,7 @@ func (c *Client) RPC(method string, args interface{}, reply interface{}) error { connReuseLowWaterMark = clientRPCMinReuseDuration + lib.RandomStagger(clientRPCMinReuseDuration/clientRPCJitterFraction) numLANMembers = len(c.LANMembers()) c.connRebalanceTime = now.Add(lib.RateScaledInterval(clusterWideRebalanceConnsPerSec, connReuseLowWaterMark, numLANMembers)) - c.logger.Printf("[DEBUG] consul: connection to server %s will expire at %v", c.lastServer.Addr, c.connRebalanceTime) + c.logger.Printf("[DEBUG] consul: connection to server %s will expire at %v", server.Addr, c.connRebalanceTime) // Forward to remote Consul TRY_RPC: