diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-25 01:02:33 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-25 19:18:13 -0500 |
commit | d4c209fb9543019461bcf612da67708aeabcdce2 (patch) | |
tree | c8c0c4b681b114080f39d6b9fc19090a78d60bf6 /dht/src/Network/Tox/AggregateSession.hs | |
parent | 9953d0a9ba7e992062ae60ae8e24054b0883b50e (diff) |
Ported dhtd to reworked QueryResponse design.
Diffstat (limited to 'dht/src/Network/Tox/AggregateSession.hs')
-rw-r--r-- | dht/src/Network/Tox/AggregateSession.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dht/src/Network/Tox/AggregateSession.hs b/dht/src/Network/Tox/AggregateSession.hs index feb634f0..33b1fafb 100644 --- a/dht/src/Network/Tox/AggregateSession.hs +++ b/dht/src/Network/Tox/AggregateSession.hs | |||
@@ -196,7 +196,10 @@ forkSession c s setStatus = forkIO $ do | |||
196 | onPacket body loop (ParseError e) = inPrint e >> loop | 196 | onPacket body loop (ParseError e) = inPrint e >> loop |
197 | onPacket body loop (Arrival _ x) = body loop x | 197 | onPacket body loop (Arrival _ x) = body loop x |
198 | 198 | ||
199 | awaitPacket body = fix $ join . atomically . awaitMessage (sTransport s) . onPacket body | 199 | awaitPacket body = fix $ \loop -> do |
200 | (m,io) <- atomically $ awaitMessage (sTransport s) | ||
201 | io | ||
202 | onPacket body loop m | ||
200 | 203 | ||
201 | atomically $ setStatus $ InProgress AwaitingSessionPacket | 204 | atomically $ setStatus $ InProgress AwaitingSessionPacket |
202 | awaitPacket $ \_ online -> do | 205 | awaitPacket $ \_ online -> do |