Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3515072
D13703.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
D13703.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
@@ -162,6 +162,7 @@
}
fn should_ignore_error(err: &lapin::Error) -> bool {
+ use lapin::protocol::{AMQPErrorKind, AMQPHardError};
use lapin::Error as E;
use std::io::ErrorKind;
@@ -169,16 +170,22 @@
return true;
}
- if let E::IOError(io_error) = err {
- return match io_error.kind() {
+ match err {
+ E::ProtocolError(amqp_err) => match amqp_err.kind() {
+ // Suppresses:
+ // "CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'"
+ // We handle this by auto-reconnecting
+ AMQPErrorKind::Hard(AMQPHardError::CONNECTIONFORCED) => true,
+ _ => false,
+ },
+ E::IOError(io_err) => match io_err.kind() {
// Suppresses: "Socket was readable but we read 0.""
// We handle this by auto-reconnecting
ErrorKind::ConnectionAborted => true,
_ => false,
- };
+ },
+ _ => false,
}
-
- false
}
pub fn is_connection_error(err: &lapin::Error) -> bool {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 7:23 AM (14 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693976
Default Alt Text
D13703.diff (1 KB)
Attached To
Mode
D13703: [tunnelbroker] Ignore CONNECTIONFORCED error message
Attached
Detach File
Event Timeline
Log In to Comment