Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-77 f57eb8b15 -> 53c199bf5
GEM-131 Not throwing forcedDisconnect exception Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/53c199bf Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/53c199bf Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/53c199bf Branch: refs/heads/feature/GEODE-77 Commit: 53c199bf529286cc04447ca067bd3b717d08706f Parents: f57eb8b Author: Hitesh Khamesra <[email protected]> Authored: Fri Nov 13 10:12:10 2015 -0800 Committer: Hitesh Khamesra <[email protected]> Committed: Fri Nov 13 14:07:16 2015 -0800 ---------------------------------------------------------------------- .../distributed/internal/membership/gms/Services.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/53c199bf/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java index d87ec8c..26f65be 100755 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java @@ -333,7 +333,7 @@ public class Services { return !getConfig().getDistributionConfig().getDisableAutoReconnect(); } - public static class Stopper extends CancelCriterion { + public class Stopper extends CancelCriterion { volatile String reasonForStopping = null; public void cancel(String reason) { @@ -342,6 +342,8 @@ public class Services { @Override public String cancelInProgress() { + if(Services.this.shutdownCause != null) + return Services.this.shutdownCause.toString(); return reasonForStopping; } @@ -357,9 +359,9 @@ public class Services { } else { if (e == null) { - return new DistributedSystemDisconnectedException(reasonForStopping); + return new DistributedSystemDisconnectedException(reason); } else { - return new DistributedSystemDisconnectedException(reasonForStopping, e); + return new DistributedSystemDisconnectedException(reason, e); } } }
