Avoid reporting ProtocolSyncError when admin session disconnects (#160)

* Avoid reporting ProtocolSyncError when admin session disconnects

* rebuild

* rebuild
This commit is contained in:
Mostafa Abdelraouf
2022-09-07 00:22:31 -05:00
committed by GitHub
parent 6a9a4db648
commit a5c8dd69b2

View File

@@ -611,13 +611,6 @@ where
message_result = read_message(&mut self.read) => message_result?
};
// Handle admin database queries.
if self.admin {
debug!("Handling admin command");
handle_admin(&mut self.write, message, self.client_server_map.clone()).await?;
continue;
}
match message[0] as char {
// Buffer extended protocol messages even if we do not have
// a server connection yet. Hopefully, when we get the S message
@@ -637,6 +630,13 @@ where
_ => (),
}
// Handle admin database queries.
if self.admin {
debug!("Handling admin command");
handle_admin(&mut self.write, message, self.client_server_map.clone()).await?;
continue;
}
// Get a pool instance referenced by the most up-to-date
// pointer. This ensures we always read the latest config
// when starting a query.