Page MenuHomePhabricator

D13592.id44870.diff
No OneTemporary

D13592.id44870.diff

diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5358,6 +5358,17 @@
"windows-sys 0.48.0",
]
+[[package]]
+name = "tokio-executor-trait"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "802ccf58e108fe16561f35348fabe15ff38218968f033d587e399a84937533cc"
+dependencies = [
+ "async-trait",
+ "executor-trait",
+ "tokio",
+]
+
[[package]]
name = "tokio-io-timeout"
version = "1.2.0"
@@ -5389,6 +5400,20 @@
"tokio",
]
+[[package]]
+name = "tokio-reactor-trait"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9481a72f36bd9cbb8d6dd349227c4783e234e4332cfe806225bc929c4b92486"
+dependencies = [
+ "async-trait",
+ "futures-core",
+ "futures-io",
+ "reactor-trait",
+ "tokio",
+ "tokio-stream",
+]
+
[[package]]
name = "tokio-rustls"
version = "0.24.1"
@@ -5808,6 +5833,8 @@
"serde",
"serde_json",
"tokio",
+ "tokio-executor-trait",
+ "tokio-reactor-trait",
"tonic 0.8.3",
"tonic-build 0.8.4",
"tracing",
diff --git a/services/tunnelbroker/Cargo.toml b/services/tunnelbroker/Cargo.toml
--- a/services/tunnelbroker/Cargo.toml
+++ b/services/tunnelbroker/Cargo.toml
@@ -36,6 +36,8 @@
], default-features = false }
reqwest = { workspace = true, features = ["json", "native-tls", "rustls-tls"] }
serde.workspace = true
+tokio-executor-trait = "2.1"
+tokio-reactor-trait = "1.1"
[build-dependencies]
tonic-build = "0.8"
diff --git a/services/tunnelbroker/src/amqp.rs b/services/tunnelbroker/src/amqp.rs
--- a/services/tunnelbroker/src/amqp.rs
+++ b/services/tunnelbroker/src/amqp.rs
@@ -16,7 +16,11 @@
amqp_uri.authority.userinfo.password = amqp_pass;
}
- let conn = Connection::connect_uri(amqp_uri, ConnectionProperties::default())
+ let options = ConnectionProperties::default()
+ .with_executor(tokio_executor_trait::Tokio::current())
+ .with_reactor(tokio_reactor_trait::Tokio);
+
+ let conn = Connection::connect_uri(amqp_uri, options)
.await
.expect("Unable to connect to AMQP endpoint");

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 11:06 PM (17 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2563413
Default Alt Text
D13592.id44870.diff (2 KB)

Event Timeline