File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Control/Distributed/Process/Platform Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1169,13 +1169,18 @@ doRestartChild _ spec _ state = do -- TODO: use ProcessId and DiedReason to log
11691169 case start' of
11701170 Right (ref, st') -> do
11711171 return $ markActive st' ref spec
1172- Left _ -> do -- TODO: handle this by policy
1172+ Left err -> do -- TODO: handle this by policy
11731173 -- All child failures are handled via monitor signals, apart from
1174- -- BadClosure, which comes back from doStartChild as (Left err).
1174+ -- BadClosure and UnresolvableAddress from the StarterProcess
1175+ -- variants of ChildStart, which both come back from
1176+ -- doStartChild as (Left err).
11751177 -- Since we cannot recover from that, there's no point in trying
11761178 -- to start this child again (as the closure will never resolve),
11771179 -- so we remove the child forthwith. We should provide a policy
11781180 -- for handling this situation though...
1181+ sup <- getSelfPid
1182+ logEntry Log. error $
1183+ mkReport " Unrecoverable error in child" sup (childKey spec) (show err)
11791184 return $ ( (active ^: Map. filter (/= chKey))
11801185 . (bumpStats Active chType decrement)
11811186 . (bumpStats Specified chType decrement)
You can’t perform that action at this time.
0 commit comments