1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-31 09:24:31 +03:00

Moved some dependencies in the workspace and upgrade some dependencies

This commit is contained in:
Quentin Gliech
2024-03-19 12:44:32 +01:00
parent 099eabd137
commit d8f5fdaf5c
25 changed files with 501 additions and 474 deletions

View File

@ -13,15 +13,15 @@ workspace = true
[dependencies]
bytes = "1.5.0"
event-listener = "4.0.3"
event-listener = "5.2.0"
futures-util = "0.3.30"
http-body = "0.4.5"
hyper = { version = "0.14.27", features = ["server", "http1", "http2", "tcp"] }
libc = "0.2.152"
http-body.workspace = true
hyper = { workspace = true, features = ["server"] }
libc = "0.2.153"
pin-project-lite = "0.2.13"
socket2 = "0.5.5"
socket2 = "0.5.6"
thiserror.workspace = true
tokio = { version = "1.35.1", features = ["net", "rt", "macros", "signal", "time"] }
tokio = { version = "1.36.0", features = ["net", "rt", "macros", "signal", "time"] }
tokio-rustls = "0.25.0"
tower-http = { version = "0.4.4", features = ["add-extension"] }
tower-service = "0.3.2"
@ -29,9 +29,9 @@ tracing.workspace = true
[dev-dependencies]
anyhow.workspace = true
rustls-pemfile = "2.0.0"
tokio = { version = "1.35.1", features = ["net", "rt", "macros", "signal", "time", "rt-multi-thread"] }
tokio-test = "0.4.3"
rustls-pemfile = "2.1.1"
tokio = { version = "1.36.0", features = ["net", "rt", "macros", "signal", "time", "rt-multi-thread"] }
tokio-test = "0.4.4"
tracing-subscriber.workspace = true
[[example]]

View File

@ -254,7 +254,6 @@ pin_project! {
connection: C,
#[pin]
shutdown_listener: EventListener,
shutdown_event: Arc<Event>,
shutdown_in_progress: Arc<AtomicBool>,
did_start_shutdown: bool,
}
@ -262,12 +261,10 @@ pin_project! {
impl<C> AbortableConnection<C> {
fn new(connection: C, shutdown_in_progress: &Arc<AtomicBool>, event: &Arc<Event>) -> Self {
let shutdown_listener = EventListener::new();
Self {
connection,
shutdown_listener,
shutdown_listener: event.listen(),
shutdown_in_progress: Arc::clone(shutdown_in_progress),
shutdown_event: Arc::clone(event),
did_start_shutdown: false,
}
}
@ -289,14 +286,6 @@ where
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let mut this = self.project();
// If we aren't listening for the shutdown signal, start listening
if !this.shutdown_listener.is_listening() {
// XXX: it feels like we should setup the listener when we create it, but it
// needs a `Pin<&mut EventListener>` to do so, and I can't figure out
// how to get one outside of the `poll` method.
this.shutdown_listener.as_mut().listen(this.shutdown_event);
}
// Poll the shutdown signal, so that wakers get registered.
// XXX: I don't think we care about the result of this poll, since it's only
// really to register wakers. But I'm not sure if it's safe to