message: Handle flush as a `Command`
diff: @@ -258,9 +258,6 @@ pub enum ClientOp {
  },
  Ping,
  Pong,
  - Flush {
  - result: oneshot::Sender<io::Result<()>>,
  - },
  TryFlush,
  Connect(ConnectInfo),
  }
  @@ -449,11 +446,6 @@ impl Connection {
  self.stream.write_all(b"PONG\r\n").await?;
  self.stream.flush().await?;
  }
  - ClientOp::Flush { result } => {
  - result.send(self.stream.flush().await).map_err(|_| {
  - io::Error::new(io::ErrorKind::Other, "one shot failed to be received")
  - })?;
  - }
  ClientOp::TryFlush => {
  self.stream.flush().await?;
  }
  @@ -461,6 +453,10 @@ impl Connection {
  Ok(())
  }
  +
  + async fn flush(&mut self) -> Result<(), io::Error> {
  + self.stream.flush().await
  + }
  }
  /// Maintains a list of servers and establishes connections.
  @@ -760,9 +756,9 @@ impl ConnectionHandler {
  }
  }
  Command::Flush { result } => {
  - if let Err(err) = self.connection.write_op(ClientOp::Flush { result }).await {
  - self.handle_reconnect().await?;
  - }
  + result.send(self.connection.flush().await).map_err(|_| {
  + io::Error::new(io::ErrorKind::Other, "one shot failed to be received")
  + })?;
  }
  Command::TryFlush => {
  if let Err(err) = self.connection.write_op(ClientOp::TryFlush).await {
  