Skip to content

Commit

Permalink
feat(server): Universal h1 header read timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Jan 14, 2025
1 parent e981a91 commit ac35062
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/proto/h1/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,14 @@ impl State {
if !T::should_read_first() {
self.notify_read = true;
}

#[cfg(feature = "server")]
if self.h1_header_read_timeout.is_some() {
// Next read will start and poll the header read timeout,
// so we can close the connection if another header isn't
// received in a timely manner.
self.notify_read = true;
}
}

fn is_idle(&self) -> bool {
Expand Down

0 comments on commit ac35062

Please sign in to comment.