git.iko.soy/distributed-process
on master help sign in
Throw NodeClosedException when the node controller is stopped.
e2bfbebFacundo Domínguez
src/Control/Distributed/Process/Node.hs+1−2
@@ -765,8 +765,7 @@ nodeController = do
765 NCMsg _ SigShutdown ->
765 NCMsg _ SigShutdown ->
766 liftIO $ do
766 liftIO $ do
767 NT.closeEndPoint (localEndPoint node)
767 NT.closeEndPoint (localEndPoint node)
768− `Exception.finally` throwIO ThreadKilled
768+ `Exception.finally` throwIO (NodeClosedException $ localNodeId node)
769− -- ThreadKilled seems to make more sense than fail/error here
770 NCMsg (ProcessIdentifier from) (GetNodeStats nid) ->
769 NCMsg (ProcessIdentifier from) (GetNodeStats nid) ->
771 ncEffectGetNodeStats from nid
770 ncEffectGetNodeStats from nid
772 unexpected ->
771 unexpected ->