Page MenuHomePhabricator

D13703.diff
No OneTemporary

D13703.diff

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

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)

Event Timeline