This is an automated email from the ASF dual-hosted git repository.
bschuchardt pushed a commit to branch feature/GEODE-6451
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-6451 by this
push:
new 60301ad change Cache.close() to stop reconnect efforts
60301ad is described below
commit 60301ad0284bf54772324c0b63f6ff09d552bd28
Author: Bruce Schuchardt <[email protected]>
AuthorDate: Tue Feb 26 16:17:42 2019 -0800
change Cache.close() to stop reconnect efforts
---
.../geode/distributed/internal/InternalDistributedSystem.java | 8 ++++++++
.../java/org/apache/geode/internal/cache/GemFireCacheImpl.java | 9 ++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git
a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
index f2df517..c78842e 100644
---
a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
+++
b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
@@ -2985,6 +2985,14 @@ public class InternalDistributedSystem extends
DistributedSystem
this.attemptingToReconnect = false;
}
+ public void stopReconnectingNoDisconnect() {
+ this.reconnectCancelled = true;
+ synchronized (this.reconnectLock) {
+ this.reconnectLock.notify();
+ }
+ this.attemptingToReconnect = false;
+ }
+
/**
* Provides hook for dunit to generate and store a detailed creation stack
trace that includes the
* keys/values of DistributionConfig including security related attributes
without introducing
diff --git
a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 3274693..c707ab7 100755
---
a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++
b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -2143,7 +2143,14 @@ public class GemFireCacheImpl implements InternalCache,
InternalClientCache, Has
return;
}
- // stopReconnecting();
+ if (systemFailureCause == null
+ && (this.isReconnecting() || this.system.getReconnectedSystem() !=
null)) {
+ this.system.stopReconnectingNoDisconnect();
+ if (this.system.getReconnectedSystem() != null) {
+ this.system.getReconnectedSystem().disconnect();
+ }
+ return;
+ }
final boolean isDebugEnabled = logger.isDebugEnabled();