diff options
Diffstat (limited to 'spark-common')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/sampler/BackgroundSamplerManager.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/BackgroundSamplerManager.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/BackgroundSamplerManager.java index d655739..7e3b6b4 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/sampler/BackgroundSamplerManager.java +++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/BackgroundSamplerManager.java @@ -41,10 +41,9 @@ public class BackgroundSamplerManager { public BackgroundSamplerManager(SparkPlatform platform, Configuration configuration) { this.platform = platform; this.configuration = configuration; - this.enabled = this.configuration.getBoolean( - OPTION_ENABLED, - this.platform.getPlugin().getPlatformInfo().getType() == PlatformInfo.Type.SERVER - ); + + PlatformInfo.Type type = this.platform.getPlugin().getPlatformInfo().getType(); + this.enabled = type != PlatformInfo.Type.CLIENT && this.configuration.getBoolean(OPTION_ENABLED, type == PlatformInfo.Type.SERVER); } public void initialise() { |