Skip to content

Commit 29e99e2

Browse files
committed
Fix replica node selection
- Make use of the internal secure TCP port if available - Remove 'Unspecified/' in the endpoint before matching
1 parent 1bff4cf commit 29e99e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/js/modules/clusterstatus/controllers/ClusterStatusListCtrl.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ define(['./_module'], function (app) {
119119

120120
function getNodeForReplica(endpoint, nodes) {
121121
for(var i = 0; i < nodes.length; i++) {
122-
var internalTcpIp = nodes[i].internalTcpIp + ':' + nodes[i].internalTcpPort;
122+
var tcpPort = nodes[i].internalSecureTcpPort ? nodes[i].internalSecureTcpPort : nodes[i].internalTcpPort;
123+
var internalTcpIp = nodes[i].internalTcpIp + ':' + tcpPort;
124+
endpoint = endpoint.replace('Unspecified/', '')
123125
if(internalTcpIp === endpoint) {
124126
return nodes[i];
125127
}

0 commit comments

Comments
 (0)