Fix task re-scheduling 54/3154/1
authorSerban Jora <sj2381@att.com>
Thu, 11 Oct 2018 19:48:37 +0000 (15:48 -0400)
committerSerban Jora <sj2381@att.com>
Thu, 11 Oct 2018 19:52:39 +0000 (15:52 -0400)
Change-Id: I5153c2f149fa51cb5922c94d181d5137c890a1fc
Issue-ID: ACUMOS-1780
Signed-off-by: Serban Jora <sj2381@att.com>
gateway/src/main/java/org/acumos/federation/gateway/task/PeerSubscriptionTaskScheduler.java

index 7a97781..ce26dd7 100644 (file)
@@ -220,6 +220,7 @@ public class PeerSubscriptionTaskScheduler {
                                                log.debug(EELFLoggerDelegate.debugLogger,
                                                                "peer {} subscription {} was updated, terminating current task", peer.getPeerId(), peerSub.getSubId());
                                                peerSubTask.stopTask();
+                                               peerSubTask = null;
                                                //this remove can be inlines as we are iterating over peersSubsTasks at this time
                                                this.peersSubsTask.remove(peer.getPeerId(), peerSub.getSubId());
                                        }