diff options
author | Luck <git@lucko.me> | 2022-11-27 23:38:21 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-11-27 23:38:21 +0000 |
commit | fc1e371d67551e9548491e9bf50534d91ce5d170 (patch) | |
tree | fc7580c99d918e4f69f990d7b5038a0c4ab44f22 /spark-common/src/main/java/me/lucko/spark/common/command | |
parent | 115ff5d8d58f6793fd8ea980a95718e7ffca1454 (diff) | |
download | spark-fc1e371d67551e9548491e9bf50534d91ce5d170.tar.gz spark-fc1e371d67551e9548491e9bf50534d91ce5d170.tar.bz2 spark-fc1e371d67551e9548491e9bf50534d91ce5d170.zip |
Temporary solution to async-profiler JVM crashing issues (#271, #273, #274)
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/command')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java index f576eac..cd00f0d 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/modules/SamplerModule.java @@ -337,9 +337,7 @@ public class SamplerModule implements CommandModule { handleUpload(platform, resp, sampler, comment, mergeMode, saveToFile); // if the previous sampler was running in the background, create a new one - if (platform.getSamplerContainer().isBackgroundProfilerEnabled()) { - platform.startBackgroundProfiler(); - + if (platform.getBackgroundSamplerManager().restartBackgroundSampler()) { resp.broadcastPrefixed(text() .append(text("Restarted the background profiler. ")) .append(text("(If you don't want this to happen, run: /" + platform.getPlugin().getCommandName() + " profiler cancel)", DARK_GRAY)) |