@@ -530,8 +530,10 @@ testMonitorChannel transport = do
530 pid <- forkProcess node1 $ do
530 pid <- forkProcess node1 $ do
531 sport <- expect :: Process (SendPort ())
531 sport <- expect :: Process (SendPort ())
532 ref <- monitorPort sport
532 ref <- monitorPort sport
533− PortMonitorNotification ref' port' DiedNormal <- expect
533+ PortMonitorNotification ref' port' reason <- expect
534+ -- reason might be DiedUnknownId if the receive port is GCed before the
535+ -- monitor is established (TODO: not sure that this is reasonable)
534− return $ ref' == ref && port' == sendPortId sport
536+ return $ ref' == ref && port' == sendPortId sport && (reason == DiedNormal || reason == DiedUnknownId)
535 liftIO $ putMVar gotNotification ()
537 liftIO $ putMVar gotNotification ()
537 runProcess node2 $ do
539 runProcess node2 $ do