message: Send priority_updates only if no settings were sent
diff: @@ -53,6 +53,18 @@ impl ControlStreamLocal {
  recv_conn: &mut HashMap<u64, Box<dyn RecvStream>>,
  ) -> Res<()> {
  if let Some(stream_id) = self.stream_id {
  + if !self.buf.is_empty() {
  + qtrace!([self], "sending data.");
  + let sent = conn.stream_send(stream_id, &self.buf[..])?;
  + if sent == self.buf.len() {
  + self.buf.clear();
  + } else {
  + let b = self.buf.split_off(sent);
  + self.buf = b;
  + }
  + }
  +
  + if !self.buf.is_empty() {
  // send all necessary priority updates
  while let Some(update_id) = self.outstanding_priority_update.pop_front() {
  let update_stream = match recv_conn.get_mut(&update_id) {
  @@ -76,16 +88,6 @@ impl ControlStreamLocal {
  self.outstanding_priority_update.push_front(update_id);
  }
  }
  -
  - if !self.buf.is_empty() {
  - qtrace!([self], "sending data.");
  - let sent = conn.stream_send(stream_id, &self.buf[..])?;
  - if sent == self.buf.len() {
  - self.buf.clear();
  - } else {
  - let b = self.buf.split_off(sent);
  - self.buf = b;
  - }
  }
  }
  Ok(())
  