@@ -88,6 +88,7 @@ import Control.Distributed.Process.Internal.CQueue
89 , newCQueue
89 , newCQueue
90 , mkWeakCQueue
90 , mkWeakCQueue
92import qualified Network.Transport as NT
93import qualified Network.Transport as NT
93 ( Transport
94 ( Transport
@@ -974,10 +975,11 @@ ncEffectGetInfo from pid =
974 case mProc of
975 case mProc of
975 Nothing -> dispatch (isLocal node (ProcessIdentifier from))
976 Nothing -> dispatch (isLocal node (ProcessIdentifier from))
976 from node (ProcessInfoNone DiedUnknownId)
977 from node (ProcessInfoNone DiedUnknownId)
977− Just _ -> do
978+ Just proc -> do
978 itsLinks <- gets (^. linksFor them)
979 itsLinks <- gets (^. linksFor them)
979 itsMons <- gets (^. monitorsFor them)
980 itsMons <- gets (^. monitorsFor them)
980 registered <- gets (^. registeredHere)
981 registered <- gets (^. registeredHere)
982+ size <- liftIO $ queueSize $ processQueue $ proc
982 let reg = registeredNames registered
984 let reg = registeredNames registered
983 dispatch (isLocal node (ProcessIdentifier from))
985 dispatch (isLocal node (ProcessIdentifier from))
@@ -986,8 +988,7 @@ ncEffectGetInfo from pid =
986 ProcessInfo {
988 ProcessInfo {
987 infoNode = (processNodeId pid)
989 infoNode = (processNodeId pid)
988 , infoRegisteredNames = reg
990 , infoRegisteredNames = reg
989− -- we cannot populate this field
990− , infoMessageQueueLength = Nothing
991+ , infoMessageQueueLength = size
991 , infoMonitors = Set.toList itsMons
992 , infoMonitors = Set.toList itsMons
992 , infoLinks = Set.toList itsLinks
993 , infoLinks = Set.toList itsLinks