|
|
@@ -36,7 +36,7 @@ func GetDialInsecure(
|
|
|
return nil, nil
|
|
|
}
|
|
|
ConnLock.Lock()
|
|
|
- conn, ok := ConnMap[clientName]
|
|
|
+ conn, ok := ConnMap[endpointNameKey]
|
|
|
ConnLock.Unlock()
|
|
|
if ok {
|
|
|
return conn, nil
|
|
|
@@ -53,15 +53,15 @@ func GetDialInsecure(
|
|
|
return nil, err
|
|
|
}
|
|
|
ConnLock.Lock()
|
|
|
- ConnMap[clientName] = conn
|
|
|
+ ConnMap[endpointNameKey] = conn
|
|
|
ConnLock.Unlock()
|
|
|
return conn, nil
|
|
|
}
|
|
|
|
|
|
-func GetDialSimple(clientName string, endpoint string, option *DialOption) (*grpc2.ClientConn, error) {
|
|
|
+func GetDialSimple(endpointNameKey string, endpoint string, option *DialOption) (*grpc2.ClientConn, error) {
|
|
|
option = checkOption(option)
|
|
|
ConnLock.Lock()
|
|
|
- conn, ok := ConnMap[clientName]
|
|
|
+ conn, ok := ConnMap[endpointNameKey]
|
|
|
ConnLock.Unlock()
|
|
|
if ok {
|
|
|
return conn, nil
|
|
|
@@ -77,7 +77,7 @@ func GetDialSimple(clientName string, endpoint string, option *DialOption) (*grp
|
|
|
return nil, err
|
|
|
}
|
|
|
ConnLock.Lock()
|
|
|
- ConnMap[clientName] = conn
|
|
|
+ ConnMap[endpointNameKey] = conn
|
|
|
ConnLock.Unlock()
|
|
|
return conn, nil
|
|
|
}
|