doRespond :: (RaftLog l e v) => Raft l e v -> IO ()
doRespond vRaft = do
    initialRaft <- atomically $ readTVar (raftContext vRaft)
    let name = raftName initialRaft
    doSynchronize vRaft onRequest (continueIfLeader name)
    where
        onRequest raft _ = return raft
        continueIfLeader name leader = name == leader

{-|
Service requests from clients
-}
doRespond :: (RaftLog l e v) => Raft l e v -> IO ()
doRespond vRaft = do
    initialRaft <- atomically $ readTVar (raftContext vRaft)
    let name = raftName initialRaft
    doSynchronize vRaft onRequest (continueIfLeader name)
    where
        onRequest raft _ = return raft
        continueIfLeader name leader = name == leader

{-|
Service requests from clients
-}
doRespond vRaft = do
    initialRaft <- atomically $ readTVar (raftContext vRaft)
    let name = raftName initialRaft
    doSynchronize vRaft onRequest (continueIfLeader name)
    where
        onRequest raft _ = return raft
        continueIfLeader name leader = name == leader

{-|
Service requests from clients
-}