add killallAndReocery test

This commit is contained in:
Xiang Li
2013-08-19 10:46:16 -07:00
parent 7b289043c7
commit 57ef6e9f5a
5 changed files with 84 additions and 15 deletions

View File

@ -170,7 +170,13 @@ func (c *Client) getHttpPath(s ...string) string {
func (c *Client) updateLeader(httpPath string) {
u, _ := url.Parse(httpPath)
leader := u.Host
var leader string
if u.Scheme == "" {
leader = "http://" + u.Host
} else {
leader = u.Scheme + "://" + u.Host
}
logger.Debugf("update.leader[%s,%s]", c.cluster.Leader, leader)
c.cluster.Leader = leader