Skip to content

Commit

Permalink
Merge pull request #6410 from fanminshi/master
Browse files Browse the repository at this point in the history
etcd-tester: fix peer-port parsing bug with localhost url
  • Loading branch information
fanmin shi authored Sep 12, 2016
2 parents 840f4d4 + 8a63071 commit ce01fb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/functional-tester/etcd-tester/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ func (m *member) grpcAddr() string {
}

func (m *member) peerPort() (port int) {
_, portStr, err := net.SplitHostPort(m.PeerURL)
u, err := url.Parse(m.PeerURL)
if err != nil {
panic(err)
}
_, portStr, err := net.SplitHostPort(u.Host)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit ce01fb3

Please sign in to comment.