Skip to content

Commit

Permalink
Merge pull request #820 from renebock/ERXStatisticsStore
Browse files Browse the repository at this point in the history
Fix for issue #811
  • Loading branch information
darkv authored Feb 10, 2017
2 parents fca342b + 4e37a91 commit f29d6cc
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,27 @@ protected void endTimer(WOContext aContext, String aString) {
}

Thread currentThread = Thread.currentThread();
Map<Thread, StackTraceElement[]> traces = _fatalTraces.remove(currentThread);
Map<Thread, String> names = _fatalTracesNames.remove(currentThread);

// get the most severe trace for the current thread
Map<Thread, StackTraceElement[]> traces = _fatalTraces.get(currentThread);
Map<Thread, String> names = _fatalTracesNames.get(currentThread);
if (traces == null) {
traces = _errorTraces.remove(currentThread);
names = _errorTracesNames.remove(currentThread);
traces = _errorTraces.get(currentThread);
names = _errorTracesNames.get(currentThread);
}
if (traces == null) {
traces = _warnTraces.remove(currentThread);
names = _warnTracesNames.remove(currentThread);
traces = _warnTraces.get(currentThread);
names = _warnTracesNames.get(currentThread);
}


// remove the current thread for _all_ traces
_fatalTraces.remove(currentThread);
_fatalTracesNames.remove(currentThread);
_errorTraces.remove(currentThread);
_errorTracesNames.remove(currentThread);
_warnTraces.remove(currentThread);
_warnTracesNames.remove(currentThread);

synchronized (_requestThreads) {
_requestThreads.remove(Thread.currentThread());
}
Expand Down

0 comments on commit f29d6cc

Please sign in to comment.