Skip to content

Commit a5c8dd6

Browse files
authored
Avoid reporting ProtocolSyncError when admin session disconnects (#160)
* Avoid reporting ProtocolSyncError when admin session disconnects * rebuild * rebuild
1 parent 6a9a4db commit a5c8dd6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/client.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -611,13 +611,6 @@ where
611611
message_result = read_message(&mut self.read) => message_result?
612612
};
613613

614-
// Handle admin database queries.
615-
if self.admin {
616-
debug!("Handling admin command");
617-
handle_admin(&mut self.write, message, self.client_server_map.clone()).await?;
618-
continue;
619-
}
620-
621614
match message[0] as char {
622615
// Buffer extended protocol messages even if we do not have
623616
// a server connection yet. Hopefully, when we get the S message
@@ -637,6 +630,13 @@ where
637630
_ => (),
638631
}
639632

633+
// Handle admin database queries.
634+
if self.admin {
635+
debug!("Handling admin command");
636+
handle_admin(&mut self.write, message, self.client_server_map.clone()).await?;
637+
continue;
638+
}
639+
640640
// Get a pool instance referenced by the most up-to-date
641641
// pointer. This ensures we always read the latest config
642642
// when starting a query.

0 commit comments

Comments
 (0)