From 1f725e2d05749cf4b84dbd2fd57557a10b4ae6c5 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 2e8ce9f03f..e7155a1444 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: