@@ -530,8 +530,10 @@ testMonitorChannel transport = do
530530 pid <- forkProcess node1 $ do
531531 sport <- expect :: Process (SendPort ())
532532 ref <- monitorPort sport
533− PortMonitorNotification ref' port' DiedNormal <- expect
534− return $ ref' == ref && port' == sendPortId sport
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)
536+ return $ ref' == ref && port' == sendPortId sport && (reason == DiedNormal || reason == DiedUnknownId)
535537 liftIO $ putMVar gotNotification ()
536538
537539 runProcess node2 $ do