mirror of https://github.com/voidlizard/hbs2
wip. fixing TCP busyloop
This commit is contained in:
parent
fd8cafc9fc
commit
025b269562
|
@ -391,11 +391,11 @@ runMessagingTCP env@MessagingTCP{..} = liftIO do
|
||||||
forever $ void $ runMaybeT do
|
forever $ void $ runMaybeT do
|
||||||
-- client sockets
|
-- client sockets
|
||||||
|
|
||||||
-- смотрим к кому надо
|
who <- atomically $ readTQueue _tcpConnDemand
|
||||||
who <- atomically $ fix \next -> do
|
|
||||||
who <- readTQueue _tcpConnDemand
|
already <- readTVarIO _tcpPeerConn <&> HM.member who
|
||||||
already <- readTVar _tcpPeerConn <&> HM.member who
|
|
||||||
if not already then pure who else next
|
when already mzero
|
||||||
|
|
||||||
debug $ "DEMAND:" <+> pretty who
|
debug $ "DEMAND:" <+> pretty who
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue