aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kamon-core/src/main/scala/kamon/Kamon.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala
index 1c560d9f..3c749b3a 100644
--- a/kamon-core/src/main/scala/kamon/Kamon.scala
+++ b/kamon-core/src/main/scala/kamon/Kamon.scala
@@ -68,8 +68,10 @@ object Kamon {
def shutdown(): Unit = {
_coreComponents = None
- _system.shutdown()
- _system = null
+ if (_system ne null) {
+ _system.shutdown()
+ _system = null
+ }
}
def metrics: MetricsModule =
@@ -95,7 +97,7 @@ object Kamon {
start()
thunk(_coreComponents.get)
- } else sys.error("Kamon has not been started yet. You must either explicitlt call Kamon.start(...) or enable " +
+ } else sys.error("Kamon has not been started yet. You must either explicitly call Kamon.start(...) or enable " +
"automatic startup by adding -Dkamon.auto-start=true to your JVM options.")
}