server: Convert `monitor_cb` from prepare handle to `raft_step` callback (#12)
Using a prepare handle is unreliable, since while the process is paused
by a Jepsen nemesis there might be a lot of data being received by the
kernel in the TCP buffer, and that data will be read eagerly by libuv,
so the prepare handle callback will not get a chance to run and detect
the leadership lost in a timely manner.
server: Convert monitor_cb from prepare handle to conn callback
Using a prepare handle is unreliable, since while the process is paused by a
Jepsen nemesis there might be a lot of data being received by the kernel in the
TCP buffer, and that data will be read eagerly by libuv, so the prepare handle
callback will not get a chance to run and detect the leadership lost in a timely
manner.