mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Merge pull request #970 from nosqlbench/nosqlbench-968-unhookhook
unregister scenario shutdown hook correctly
This commit is contained in:
commit
9d7f92edb4
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
* Copyright (c) 2022-2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -277,8 +277,10 @@ public class Scenario implements Callable<ExecutionMetricsResult> {
|
||||
}
|
||||
|
||||
Runtime.getRuntime().removeShutdownHook(scenarioShutdownHook);
|
||||
scenarioShutdownHook.run();
|
||||
var runHook = scenarioShutdownHook;
|
||||
scenarioShutdownHook = null;
|
||||
runHook.run();
|
||||
logger.debug("removing scenario shutdown hook");
|
||||
}
|
||||
|
||||
public void notifyException(Thread t, Throwable e) {
|
||||
|
Loading…
Reference in New Issue
Block a user