@@ -177,7 +177,11 @@ _ `impliesDeathOf` _ =
180−-- Send a control message
180+-- Send a control message. Evaluates the message to HNF before sending it.
182+-- The message shouldn't produce more errors when further evaluated. If
183+-- evaluation threw errors the node controller or the receiver would crash when
181sendCtrlMsg :: Maybe NodeId -- ^ Nothing for the local node
185sendCtrlMsg :: Maybe NodeId -- ^ Nothing for the local node
182 -> ProcessSignal -- ^ Message to send
186 -> ProcessSignal -- ^ Message to send
183 -> Process ()
187 -> Process ()
@@ -188,7 +192,7 @@ sendCtrlMsg mNid signal = do
189 case mNid of
193 case mNid of
190 Nothing -> do
194 Nothing -> do
191− liftIO $ writeChan (localCtrlChan (processNode proc)) msg
195+ liftIO $ writeChan (localCtrlChan (processNode proc)) $! msg
192 Just nid ->
196 Just nid ->
193 liftIO $ sendBinary (processNode proc)
197 liftIO $ sendBinary (processNode proc)
194 (ProcessIdentifier (processId proc))
198 (ProcessIdentifier (processId proc))