heartbeat  from 
                                 -- 0 (no heartbeats) to
                                 -- 5 seconds
            then do void $ unRegister c jn wn rn tmo
                    throwIO $ UnacceptableHbX me
            else do hb &lt;- mkHB me
                    m  &lt;- newMVar hb 
                    let p = if me &lt;= 0 then (-1) else 1000 * me 
                    withWriter c &quot;HB&quot; reg [] [] nobody $ \w -&gt; 
                      finally (forever $
                        re