kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | d95a45e479a7167e0cfae0e50c89346e7413f4715f6ece5080cd1e80bd868eed |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2016-03-10 16:55 -06:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-03-15 10:31 +01:00 |
| Parents | 23c646c58e54 |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +3 −7
| @@ -427,10 +427,9 @@ | ||
| 427 | 427 | InetAddress peer = peersRow.getInet("peer"); |
| 428 | 428 | InetAddress addr = peersRow.getInet("rpc_address"); |
| 429 | 429 | |
| 430 | - // We've already called isValid on the row, which checks this | |
| 431 | - assert addr != null; | |
| 432 | - | |
| 433 | - if (peer.equals(connectedHost.getAddress()) || addr.equals(connectedHost.getAddress())) { | |
| 430 | + if (addr == null) { | |
| 431 | + return null; | |
| 432 | + } else if (peer.equals(connectedHost.getAddress()) || addr.equals(connectedHost.getAddress())) { | |
| 434 | 433 | // Some DSE versions were inserting a line for the local node in peers (with mostly null values). This has been fixed, but if we |
| 435 | 434 | // detect that's the case, ignore it as it's not really a big deal. |
| 436 | 435 | logger.debug("System.peers on node {} has a line for itself. This is not normal but is a known problem of some DSE version. Ignoring the entry.", connectedHost); |
| @@ -733,9 +732,6 @@ | ||
| 733 | 732 | |
| 734 | 733 | for (Row row : peersFuture.get()) { |
| 735 | 734 | |
| 736 | - if (!isValidPeer(row, false)) | |
| 737 | - continue; | |
| 738 | - | |
| 739 | 735 | InetSocketAddress addr = addressToUseForPeerHost(row, connection.address, cluster); |
| 740 | 736 | if (addr == null || row.isNull("schema_version")) |
| 741 | 737 | continue; |