on master help sign in
Fix react
commitbb402cb4d7273b312eb999538a0e2a5279751cc8 authorHarendra Kumar <harendra.kumar@gmail.com> dateMon 12 Jun 2017, 02:01 (9 years ago) parenta439149
1 file changed+4−4
src/Duct/Threads.hs+4−4
src/Duct/Threads.hs+4−4
@@ -332,18 +332,18 @@ react
332332 -> IO response
333333 -> AsyncT m eventdata
334334react setHandler iob = AsyncT $ do
335− cont <- get
336− case event cont of
335+ context <- get
336+ case event context of
337337 Nothing -> do
338338 lift $ setHandler $ \dat ->do
339− runStateT (resume cont) cont{event= Just $ unsafeCoerce dat}
339+ resume (updateContextEvent context dat)
340340 liftIO iob
341341 loc <- getLocation
342342 when (loc /= RemoteNode) $ setLocation WaitingParent
343343 return Nothing
344344
345345 j@(Just _) -> do
346− put cont{event=Nothing}
346+ put context{event=Nothing}
347347 return $ unsafeCoerce j
348348
349349------------------------------------------------------------------------------