Skip to content

Commit

Permalink
Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed May 28, 2024
1 parent d9c6d44 commit 89efb8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
15 changes: 0 additions & 15 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,21 +286,6 @@ impl Config {
self
}

#[deprecated()]
#[doc(hidden)]
/// Set server client timeout for first request.
///
/// Defines a timeout for reading client request header. If a client does not transmit
/// the entire set headers within this time, the request is terminated with
/// the 408 (Request Time-out) error.
///
/// To disable timeout set value to 0.
///
/// By default client timeout is set to 3 seconds.
pub fn client_timeout(&self, _: Seconds) -> &Self {
self
}

/// Set read rate parameters for single frame.
///
/// Set read timeout, max timeout and rate for reading payload. If the client
Expand Down
8 changes: 5 additions & 3 deletions src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ where

async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error> {
let (res1, res2) = join(
ctx.ready(&self.inner.publish), ctx.ready(&self.inner.control)).await;
ctx.ready(&self.inner.publish),
ctx.ready(&self.inner.control),
)
.await;

res1.map_err(|_| ())?;
res2.map_err(|_| ())?;
Expand All @@ -113,8 +116,7 @@ where
.call(Control::terminated())
.await;

join(self.inner.publish.shutdown(),
self.inner.control.shutdown()).await;
join(self.inner.publish.shutdown(), self.inner.control.shutdown()).await;

self.connection.disconnect();
}
Expand Down

0 comments on commit 89efb8d

Please sign in to comment.