Skip to content

Commit

Permalink
Merge pull request #15 from pcnfernando/master
Browse files Browse the repository at this point in the history
Add null check during pause and resume
  • Loading branch information
dilini-muthumala authored May 28, 2019
2 parents 7acab1c + 7b679e4 commit 782afa4
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,22 @@ public void destroy() {

@Override
public void pause() {
natsMessageProcessor.pause();
if (natsMessageProcessor != null) {
natsMessageProcessor.pause();
if (log.isDebugEnabled()) {
log.debug("Nats source paused for destination: " + destination);
}
}
}

@Override
public void resume() {
natsMessageProcessor.resume();
if (natsMessageProcessor != null) {
natsMessageProcessor.resume();
if (log.isDebugEnabled()) {
log.debug("Nats source resumed for destination: " + destination);
}
}
}

private void subscribe(NATSSourceState natsSourceState) {
Expand Down

0 comments on commit 782afa4

Please sign in to comment.