From 7dfc802b753f21afcb656b13d30d49bc548ac150 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 17 Apr 2020 22:41:53 +0200 Subject: Reaktor.API: make configurable --- src/Reaktor.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Reaktor.hs') diff --git a/src/Reaktor.hs b/src/Reaktor.hs index 0d4e42c..cc93109 100644 --- a/src/Reaktor.hs +++ b/src/Reaktor.hs @@ -41,8 +41,8 @@ import System.IO (hIsTerminalDevice) import System.Posix.Signals -run :: Config -> (Actions -> IO [Message -> IO ()]) -> IO () -run Config{..} getPlugins = +run :: Config -> Maybe API.Config -> (Actions -> IO [Message -> IO ()]) -> IO () +run Config{..} apiConfig getPlugins = if cUseTLS then do s <- TLS.getDefaultClientSettings (cHostName, BS.pack cServiceName) TLS.connect s cHostName cServiceName $ \(ctx, sockAddr) -> @@ -84,7 +84,7 @@ run Config{..} getPlugins = plugins <- getPlugins actions threads <- mapM (\f -> forkIO $ f `finally` shutdown) [ - API.main actions, + API.main actions apiConfig, receiver actions putInMsg sockRecv, logger cLogHandle takeLog, pinger aSend, -- cgit v1.2.3