Skip to content

Commit e2bfbeb

Browse files
Throw NodeClosedException when the node controller is stopped.
Formerly the NC could end with either NodeClosedException or with ThreadKilled. ThreadKilled was a bit confusing because there is no call to threadKill to send it and there was no good reason to prefer it over NodeClosedException.
1 parent 4c0c890 commit e2bfbeb

File tree

1 file changed

+1
-2
lines changed
  • src/Control/Distributed/Process

1 file changed

+1
-2
lines changed

src/Control/Distributed/Process/Node.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,7 @@ nodeController = do
765765
NCMsg _ SigShutdown ->
766766
liftIO $ do
767767
NT.closeEndPoint (localEndPoint node)
768-
`Exception.finally` throwIO ThreadKilled
769-
-- ThreadKilled seems to make more sense than fail/error here
768+
`Exception.finally` throwIO (NodeClosedException $ localNodeId node)
770769
NCMsg (ProcessIdentifier from) (GetNodeStats nid) ->
771770
ncEffectGetNodeStats from nid
772771
unexpected ->

0 commit comments

Comments
 (0)