feat(server): Remove Send + Sync requirement for Body in with_graceful_shutdown

Also expand the single threaded example to use that.
This commit is contained in:
Rafael Ávila de Espíndola
2021-10-12 14:51:35 -07:00
committed by Sean McArthur
parent 7feab2f3db
commit 1d553e52c6
3 changed files with 12 additions and 4 deletions

View File

@@ -121,7 +121,7 @@ where
IO: AsyncRead + AsyncWrite + Unpin + Send + 'static,
S: MakeServiceRef<IO, Body, ResBody = B>,
S::Error: Into<Box<dyn StdError + Send + Sync>>,
B: HttpBody + Send + Sync + 'static,
B: HttpBody + 'static,
B::Error: Into<Box<dyn StdError + Send + Sync>>,
E: ConnStreamExec<<S::Service as HttpService<Body>>::Future, B>,
E: NewSvcExec<IO, S::Future, S::Service, E, GracefulWatcher>,