mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6410 from fanminshi/master
etcd-tester: fix peer-port parsing bug with localhost url
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user