From e218ef150ec740ad0e02c32b7f2fc7698140f4e9 Mon Sep 17 00:00:00 2001 From: Denis Shevchenko Date: Wed, 13 Oct 2021 13:02:58 +0400 Subject: [PATCH] trace-dispatcher: direct async instead of withAsync. --- .../src/Cardano/Logging/Forwarding.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/trace-dispatcher/src/Cardano/Logging/Forwarding.hs b/trace-dispatcher/src/Cardano/Logging/Forwarding.hs index b6b73dcc3c7..35c024becf9 100644 --- a/trace-dispatcher/src/Cardano/Logging/Forwarding.hs +++ b/trace-dispatcher/src/Cardano/Logging/Forwarding.hs @@ -11,7 +11,8 @@ module Cardano.Logging.Forwarding ) where import Codec.CBOR.Term (Term) -import Control.Concurrent.Async (race_, wait, withAsync) +import Control.Concurrent.Async (async, race_, wait) +import Control.Monad (void) import Control.Monad.IO.Class import "contra-tracer" Control.Tracer (contramap, stdoutTracer) @@ -93,13 +94,12 @@ launchForwarders -> TF.ForwarderConfiguration TraceObject -> ForwardSink TraceObject -> IO () -launchForwarders iomgr TraceConfig{tcForwarder} store ekgConfig tfConfig sink = flip - withAsync - wait - $ runActionInLoop - (launchForwardersViaLocalSocket iomgr tcForwarder (ekgConfig, tfConfig) sink store) - (TF.LocalPipe p) - 1 +launchForwarders iomgr TraceConfig{tcForwarder} store ekgConfig tfConfig sink = + void . async $ + runActionInLoop + (launchForwardersViaLocalSocket iomgr tcForwarder (ekgConfig, tfConfig) sink store) + (TF.LocalPipe p) + 1 where LocalSocket p = tofAddress tcForwarder