@@ -119,6 +119,7 @@ import Control.Distributed.Process.Internal.Node
119 ( sendBinary
119 ( sendBinary
120 , sendMessage
120 , sendMessage
121 , sendPayload
121 , sendPayload
123import Control.Distributed.Process.Internal.Primitives (expect, register, finally)
124import Control.Distributed.Process.Internal.Primitives (expect, register, finally)
124import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn (remoteTable)
125import qualified Control.Distributed.Process.Internal.Closure.BuiltIn as BuiltIn (remoteTable)
@@ -424,6 +425,8 @@ nodeController = do
424 ncEffectWhereIs from label
425 ncEffectWhereIs from label
425 NCMsg from (NamedSend label msg') ->
426 NCMsg from (NamedSend label msg') ->
426 ncEffectNamedSend from label msg'
427 ncEffectNamedSend from label msg'
428+ NCMsg from (Reconnect to) ->
429+ ncEffectReconnect from to
427 unexpected ->
430 unexpected ->
428 error $ "nodeController: unexpected message " ++ show unexpected
431 error $ "nodeController: unexpected message " ++ show unexpected
@@ -547,6 +550,12 @@ ncEffectNamedSend from label msg = do
547 (ProcessIdentifier pid)
550 (ProcessIdentifier pid)
548 (messageToPayload msg)
551 (messageToPayload msg)
554+ncEffectReconnect :: Identifier -> Identifier -> NC ()
555+ncEffectReconnect from to = do
557+ liftIO $ reconnect node from to
550--------------------------------------------------------------------------------
559--------------------------------------------------------------------------------
551-- Auxiliary --
560-- Auxiliary --
552--------------------------------------------------------------------------------
561--------------------------------------------------------------------------------
@@ -592,6 +601,7 @@ destNid (Spawn _ _) = Nothing
592destNid (Register _ _) = Nothing
601destNid (Register _ _) = Nothing
593destNid (WhereIs _) = Nothing
602destNid (WhereIs _) = Nothing
594destNid (NamedSend _ _) = Nothing
603destNid (NamedSend _ _) = Nothing
604+destNid (Reconnect _) = Nothing
595-- We don't need to forward 'Died' signals; if monitoring/linking is setup,
605-- We don't need to forward 'Died' signals; if monitoring/linking is setup,
596-- then when a local process dies the monitoring/linking machinery will take
606-- then when a local process dies the monitoring/linking machinery will take
597-- care of notifying remote nodes
607-- care of notifying remote nodes