diff --git a/src/ATrade/QuoteSource/Client.hs b/src/ATrade/QuoteSource/Client.hs index 289ad8d..e15c2cc 100644 --- a/src/ATrade/QuoteSource/Client.hs +++ b/src/ATrade/QuoteSource/Client.hs @@ -34,7 +34,7 @@ startQuoteSourceClient chan tickers ctx endpoint = do finally (clientThread sock) (cleanup compMv sock) return QuoteSourceClientHandle { tid = tid, completionMvar = compMv } where - clientThread sock = do + clientThread sock = forever $ do evs <- poll 200 [Sock sock [In] Nothing] when ((L.length . L.head) evs > 0) $ do rawTick <- fmap BL.fromStrict <$> receiveMulti sock