This commit is contained in:
Lev Kokotov
2022-02-04 16:08:18 -08:00
parent fa46e15318
commit 52c4cac175
2 changed files with 5 additions and 0 deletions

View File

@@ -305,6 +305,7 @@ impl Server {
self.bad = true;
}
/// Claim this server as mine for the purposes of query cancellation.
pub fn claim(&mut self, process_id: i32, secret_key: i32) {
let mut guard = self.client_server_map.lock().unwrap();
guard.insert((process_id, secret_key), (self.backend_id, self.secret_key));