Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3341121
D13593.id44871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13593.id44871.diff
View Options
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
@@ -1,3 +1,4 @@
+use crate::constants::error_types;
use crate::CONFIG;
use lapin::{uri::AMQPUri, Connection, ConnectionProperties};
use tracing::info;
@@ -23,6 +24,12 @@
let conn = Connection::connect_uri(amqp_uri, options)
.await
.expect("Unable to connect to AMQP endpoint");
+ conn.on_error(|error| {
+ tracing::error!(
+ errorType = error_types::AMQP_ERROR,
+ "Lapin error: {error:?}"
+ );
+ });
info!("Connected to AMQP endpoint: {}", &CONFIG.amqp_uri);
conn
diff --git a/services/tunnelbroker/src/websockets/session.rs b/services/tunnelbroker/src/websockets/session.rs
--- a/services/tunnelbroker/src/websockets/session.rs
+++ b/services/tunnelbroker/src/websockets/session.rs
@@ -684,7 +684,7 @@
pub async fn send_message_to_device(&mut self, message: Message) {
if let Err(e) = self.tx.send(message).await {
error!(
- errorType = error_types::AMQP_ERROR,
+ errorType = error_types::WEBSOCKET_ERROR,
"Failed to send message to device: {}", e
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 10:32 PM (17 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2565972
Default Alt Text
D13593.id44871.diff (1 KB)
Attached To
Mode
D13593: [tunnelbroker] Add error listener for AMQP
Attached
Detach File
Event Timeline
Log In to Comment