From 98d1b9dd9e67d3b5fb2969d1129f6e57bd7fc2e1 Mon Sep 17 00:00:00 2001 From: Dmitry Perchanov Date: Sun, 28 Jul 2024 18:23:45 +0300 Subject: [PATCH] resolver: skip restart if disabled. Signed-off-by: Dmitry Perchanov --- src/resolver.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/resolver.rs b/src/resolver.rs index 8866b2c..1a5c581 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -275,6 +275,10 @@ pub fn stop(ctx: &Context) -> Result<()> { } pub fn restart(ctx: &Context) -> Result<()> { + let config = &ctx.config.resolver; + if !config.enabled() { + return Ok(()); + } step("Restarting 'kaspa-resolver'", || { systemd::restart(&ctx.config.resolver) })