diff --git a/hydra-node/src/Hydra/Logging.hs b/hydra-node/src/Hydra/Logging.hs index 6b723ef308d..0685f859e84 100644 --- a/hydra-node/src/Hydra/Logging.hs +++ b/hydra-node/src/Hydra/Logging.hs @@ -104,8 +104,8 @@ withTracerOutputTo :: IO a withTracerOutputTo hdl namespace action = do msgQueue <- newTBQueueIO @_ @(Envelope msg) defaultQueueSize - withAsync (writeLogs msgQueue `finally` flushLogs msgQueue) $ \_ -> - action (tracer msgQueue) + withAsync (writeLogs msgQueue) $ \_ -> + action (tracer msgQueue) `finally` flushLogs msgQueue where tracer queue = Tracer $