@@ -121,6 +121,7 @@ import Control.Distributed.Process.Internal.Node
121 ( sendBinary
121 ( sendBinary
122 , sendMessage
122 , sendMessage
123 , sendPayload
123 , sendPayload
125import Control.Distributed.Process.Internal.Primitives (expect, register, finally)
126import Control.Distributed.Process.Internal.Primitives (expect, register, finally)
126import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn (remoteTable)
127import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn (remoteTable)
@@ -434,6 +435,8 @@ nodeController = do
434 ncEffectWhereIs from label
435 ncEffectWhereIs from label
435 NCMsg from (NamedSend label msg') ->
436 NCMsg from (NamedSend label msg') ->
436 ncEffectNamedSend from label msg'
437 ncEffectNamedSend from label msg'
438+ NCMsg from (Reconnect to) ->
439+ ncEffectReconnect from to
437 unexpected ->
440 unexpected ->
438 error $ "nodeController: unexpected message " ++ show unexpected
441 error $ "nodeController: unexpected message " ++ show unexpected
@@ -557,6 +560,12 @@ ncEffectNamedSend from label msg = do
557 (ProcessIdentifier pid)
560 (ProcessIdentifier pid)
558 (messageToPayload msg)
561 (messageToPayload msg)
564+ncEffectReconnect :: Identifier -> Identifier -> NC ()
565+ncEffectReconnect from to = do
567+ liftIO $ reconnect node from to
560--------------------------------------------------------------------------------
569--------------------------------------------------------------------------------
561-- Auxiliary --
570-- Auxiliary --
562--------------------------------------------------------------------------------
571--------------------------------------------------------------------------------
@@ -602,6 +611,7 @@ destNid (Spawn _ _) = Nothing
602destNid (Register _ _) = Nothing
611destNid (Register _ _) = Nothing
603destNid (WhereIs _) = Nothing
612destNid (WhereIs _) = Nothing
604destNid (NamedSend _ _) = Nothing
613destNid (NamedSend _ _) = Nothing
614+destNid (Reconnect _) = Nothing
605-- We don't need to forward 'Died' signals; if monitoring/linking is setup,
615-- We don't need to forward 'Died' signals; if monitoring/linking is setup,
606-- then when a local process dies the monitoring/linking machinery will take
616-- then when a local process dies the monitoring/linking machinery will take
607-- care of notifying remote nodes
617-- care of notifying remote nodes