mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Bump deps of webhook-axum
Otherwise some changes in axum's Router interface prevent teloxide's webhook support from being used with up-to-date axum.
This commit is contained in:
parent
9901a57472
commit
8ad1bd1928
2 changed files with 6 additions and 6 deletions
|
@ -112,9 +112,9 @@ sqlx = { version = "0.7.3", optional = true, default-features = false, features
|
|||
redis = { version = "0.24", features = ["tokio-comp"], optional = true }
|
||||
serde_cbor = { version = "0.11", optional = true }
|
||||
bincode = { version = "1.3", optional = true }
|
||||
axum = { version = "0.6.0", optional = true }
|
||||
tower = { version = "0.4.12", optional = true }
|
||||
tower-http = { version = "0.3.4", features = ["trace"], optional = true }
|
||||
axum = { version = "0.7.0", optional = true }
|
||||
tower = { version = "0.4.13", optional = true }
|
||||
tower-http = { version = "0.5.2", features = ["trace"], optional = true }
|
||||
rand = { version = "0.8.5", optional = true }
|
||||
|
||||
# HACK: ahash 0.8.7 bumped MSRV to 1.72, to keep MVSR 1.68 we need to depend on an older version.
|
||||
|
|
|
@ -47,13 +47,13 @@ where
|
|||
<R as Requester>::DeleteWebhook: Send,
|
||||
{
|
||||
let Options { address, .. } = options;
|
||||
let tcp_listener = tokio::net::TcpListener::bind(address).await.unwrap();
|
||||
|
||||
let (mut update_listener, stop_flag, app) = axum_to_router(bot, options).await?;
|
||||
let stop_token = update_listener.stop_token();
|
||||
|
||||
tokio::spawn(async move {
|
||||
axum::Server::bind(&address)
|
||||
.serve(app.into_make_service())
|
||||
axum::serve(tcp_listener, app)
|
||||
.with_graceful_shutdown(stop_flag)
|
||||
.await
|
||||
.map_err(|err| {
|
||||
|
@ -90,7 +90,7 @@ where
|
|||
/// [`delete_webhook`]: crate::payloads::DeleteWebhook
|
||||
/// [`stop`]: crate::stop::StopToken::stop
|
||||
/// [`options.address`]: Options::address
|
||||
/// [`with_graceful_shutdown`]: axum::Server::with_graceful_shutdown
|
||||
/// [`with_graceful_shutdown`]: axum::serve::Serve::with_graceful_shutdown
|
||||
///
|
||||
/// ## Returns
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue