Skip to content

Commit 53f3898

Browse files
author
Bilal Al
committed
added check to avoid start periodic sync if shutdown is in request
1 parent 07d0ef4 commit 53f3898

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/main/java/io/split/engine/common/SyncManagerImp.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ private void startPollingMode() {
194194

195195
@VisibleForTesting
196196
/* package private */ void incomingPushStatusHandler() {
197-
while (!Thread.interrupted()) {
197+
while (!Thread.currentThread().isInterrupted()) {
198198
try {
199199
PushManager.Status status = _incomingPushStatus.take();
200200
_log.debug(String.format("Streaming status received: %s", status.toString()));
@@ -212,6 +212,9 @@ private void startPollingMode() {
212212
case STREAMING_DOWN:
213213
_log.info("Streaming service temporarily unavailable, working in polling mode.");
214214
_pushManager.stopWorkers();
215+
if(_shuttedDown.get()) {
216+
break;
217+
}
215218
_synchronizer.startPeriodicFetching();
216219
break;
217220
case STREAMING_BACKOFF:

0 commit comments

Comments
 (0)