Reset peer's receive timeout when a message is received

* Make advance_clock more realistic by waking timers in order,
  instead of all at once.
* Don't advance the clock when simulating random delays.

Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-03-07 15:33:39 -08:00
parent 120f7bbc3d
commit 1f5eab39a9
5 changed files with 67 additions and 32 deletions

View file

@ -283,6 +283,7 @@ pub struct MessageStream<S> {
encoding_buffer: Vec<u8>,
}
#[derive(Debug)]
pub enum Message {
Envelope(Envelope),
Ping,