[Discovery] Fault detection should also check cause exceptions for disconnects

The change introduced in #6686 checks for ConnectionTransportException during pinging. However, transport layer wraps it in  SendRequestTransportException
This commit is contained in:
Boaz Leskes 2014-07-03 13:42:53 +02:00
parent 955473f475
commit 7beac4ddbf
2 changed files with 2 additions and 2 deletions

View File

@ -299,7 +299,7 @@ public class MasterFaultDetection extends AbstractComponent {
synchronized (masterNodeMutex) {
// check if the master node did not get switched on us...
if (masterToPing.equals(MasterFaultDetection.this.masterNode())) {
if (exp instanceof ConnectTransportException) {
if (exp instanceof ConnectTransportException || exp.getCause() instanceof ConnectTransportException) {
handleTransportDisconnect(masterToPing);
return;
} else if (exp.getCause() instanceof NoLongerMasterException) {

View File

@ -233,7 +233,7 @@ public class NodesFaultDetection extends AbstractComponent {
if (!nodeFD.running) {
return;
}
if (exp instanceof ConnectTransportException) {
if (exp instanceof ConnectTransportException || exp.getCause() instanceof ConnectTransportException) {
handleTransportDisconnect(node);
return;
}