mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-05 05:18:52 +08:00
fix querynode's port not set correctly when conflict with other node (#5066)
Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
parent
172f416e8f
commit
1e7205fa03
@ -215,7 +215,7 @@ func (s *Server) startGrpcLoop(grpcPort int) {
|
|||||||
addr := ":" + strconv.Itoa(grpcPort)
|
addr := ":" + strconv.Itoa(grpcPort)
|
||||||
lis, err = net.Listen("tcp", addr)
|
lis, err = net.Listen("tcp", addr)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
Params.QueryNodePort = lis.Addr().(*net.TCPAddr).Port
|
qn.Params.QueryNodePort = int64(lis.Addr().(*net.TCPAddr).Port)
|
||||||
} else {
|
} else {
|
||||||
// set port=0 to get next available port
|
// set port=0 to get next available port
|
||||||
grpcPort = 0
|
grpcPort = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user