git.iko.soy/distributed-process
on master help sign in
Fix MX notification of re-registration events
commit629a6fad07db3d1903b01e94ab377d713d7cf547 authorTim Watson <watson.timothy@gmail.com> dateMon 12 Nov 2018, 01:29 (8 years ago) parente0092ac
1 file changed+5−1
src/Control/Distributed/Process/Node.hs+5−1
src/Control/Distributed/Process/Node.hs+5−1
@@ -955,7 +955,11 @@ ncEffectRegister from label atnode mPid reregistration = do
955955 do modify' $ registeredHereFor label ^= mPid
956956 updateRemote node currentVal mPid
957957 case mPid of
958− (Just p) -> liftIO $ trace node (MxRegistered p label)
958+ (Just p) -> do
959+ if reregistration
960+ then liftIO $ trace node (MxUnRegistered (fromJust currentVal) label)
961+ else return ()
962+ liftIO $ trace node (MxRegistered p label)
959963 Nothing -> liftIO $ trace node (MxUnRegistered (fromJust currentVal) label)
960964 newVal <- gets (^. registeredHereFor label)
961965 ncSendToProcess from $ unsafeCreateUnencodedMessage $