Browse Source

QuoteSource client: bugfix

master
Denis Tereshkin 9 years ago
parent
commit
21f9a01b26
  1. 2
      src/ATrade/QuoteSource/Client.hs

2
src/ATrade/QuoteSource/Client.hs

@ -34,7 +34,7 @@ startQuoteSourceClient chan tickers ctx endpoint = do @@ -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

Loading…
Cancel
Save