From 9e31193fbfef9972b5434eecd5675f0f73fcb7fd Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Tue, 31 Oct 2023 21:02:39 +0700 Subject: [PATCH] Really fix qss forking --- src/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 290a047..f469704 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -95,18 +95,18 @@ main = do ")" void $ withContext $ \ctx -> do qssChannel <- newBoundedChan 50000 + (forkTid, qssCh1, qssCh2) <- forkQssChannel qssChannel bracket (startQuoteSourceServer - qssChannel + qssCh1 ctx (quotesourceEndpoint cfg) defaultServerSecurityParams) stopQuoteSourceServer $ \_ -> withTickerInfoServer logger ctx (tisEndpoint cfg) $ \tisH -> do withZMQTradeSink ctx (tradesinkDashboard cfg) logger $ \tsDashboard -> withGotifyTradeSink (T.unpack $ gotifyUri cfg) (T.unpack $ gotifyToken cfg) logger $ \tsGotify -> do - (forkTid, qssCh1, qssCh2) <- forkQssChannel qssChannel tickTable <- newTickTable paper <- mkPaperBroker tickTable tisH qssCh2 (fromDouble 100000.0) ["demo"] (commissions cfg) logger - txml <- Connector.start logger tickTable cfg qssCh1 tisH + txml <- Connector.start logger tickTable cfg qssChannel tisH bracket (startBrokerServer [Connector.makeBrokerBackend txml (account cfg), paper] ctx