Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32509302
D5012.1767101412.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
982 B
Referenced Files
None
Subscribers
None
D5012.1767101412.diff
View Options
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
@@ -243,5 +243,31 @@
}
pub fn put_client_terminate_cxx() -> Result<(), String> {
- unimplemented!();
+ check_error()?;
+ if !is_initialized() {
+ check_error()?;
+ return Ok(());
+ }
+
+ if let Ok(mut maybe_client) = CLIENT.lock() {
+ if let Some(client) = (*maybe_client).take() {
+ drop(client.tx);
+ RUNTIME.block_on(async {
+ if client.rx_handle.await.is_err() {
+ report_error("wait for receiver handle failed".to_string());
+ }
+ });
+ } else {
+ return Err("no client detected".to_string());
+ }
+ } else {
+ return Err("couldn't access client".to_string());
+ }
+
+ assert!(
+ !is_initialized(),
+ "client transmitter handler released properly"
+ );
+ check_error()?;
+ Ok(())
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 30, 1:30 PM (8 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5867274
Default Alt Text
D5012.1767101412.diff (982 B)
Attached To
Mode
D5012: [services] Backup - Blob Put Client - Add terminate
Attached
Detach File
Event Timeline
Log In to Comment