Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Koksharov committed May 10, 2024
1 parent ab31631 commit 7a8ee73
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ private void poll(String id) {
log.error(ex.getCause().getMessage(), ex.getCause());

getServiceManager().newTimeout(task -> {
if (getServiceManager().isShuttingDown()) {
return;
}

poll(id);
}, 1, TimeUnit.SECONDS);
return;
Expand Down Expand Up @@ -325,7 +329,7 @@ public RFuture<Integer> countSubscribersAsync() {

private void renewExpiration() {
timeoutTask = getServiceManager().newTimeout(t -> {
if (!subscribed.get()) {
if (!subscribed.get() || getServiceManager().isShuttingDown()) {
return;
}

Expand Down

0 comments on commit 7a8ee73

Please sign in to comment.