Page MenuHomePhabricator

D5010.id16170.diff
No OneTemporary

D5010.id16170.diff

diff --git a/services/backup/blob_client/src/put_client.rs b/services/backup/blob_client/src/put_client.rs
--- a/services/backup/blob_client/src/put_client.rs
+++ b/services/backup/blob_client/src/put_client.rs
@@ -191,7 +191,28 @@
}
pub fn put_client_blocking_read_cxx() -> Result<String, String> {
- unimplemented!();
+ let mut response: Option<String> = None;
+ check_error()?;
+ RUNTIME.block_on(async {
+ if let Ok(mut maybe_client) = CLIENT.lock() {
+ if let Some(mut client) = (*maybe_client).take() {
+ if let Some(data) = client.rx.recv().await {
+ response = Some(data);
+ } else {
+ report_error(
+ "couldn't receive data via client's receiver".to_string(),
+ );
+ }
+ *maybe_client = Some(client);
+ } else {
+ report_error("no client detected".to_string());
+ }
+ } else {
+ report_error("couldn't access client".to_string());
+ }
+ });
+ check_error()?;
+ response.ok_or("response not received properly".to_string())
}
/**

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 8:15 AM (19 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2519749
Default Alt Text
D5010.id16170.diff (1 KB)

Event Timeline