Browse Source

Fix bug of not updating activity count on exception

tags/1.0.25
ymlam 2 years ago
parent
commit
9055d74fc3
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/main/java/altk/comm/engine/Broadcast.java

+ 2
- 0
src/main/java/altk/comm/engine/Broadcast.java View File

@@ -375,12 +375,14 @@ public abstract class Broadcast
{ {
// Aborting // Aborting
setState(BroadcastState.ABORTING, e.errorCodeText, e.errorText); setState(BroadcastState.ABORTING, e.errorCodeText, e.errorText);
updateServiceActivityCount(-batch.size());
} }
catch (Throwable t) catch (Throwable t)
{ {
// This is unexpected. Log stack trace // This is unexpected. Log stack trace
myLogger.error("Caught unexpected Throwable", t); myLogger.error("Caught unexpected Throwable", t);
terminate(BroadcastState.ABORTED, t + ": " + t.getMessage()); terminate(BroadcastState.ABORTED, t + ": " + t.getMessage());
updateServiceActivityCount(-batch.size());
} }
if (sleepBetweenJobs > 0) if (sleepBetweenJobs > 0)
{ {


Loading…
Cancel
Save