Skip to content

Commit b7131ca

Browse files
portal: Unlock the collection if locked
Closes #235
1 parent 66a40ae commit b7131ca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

portal/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ async fn send_secret_to_app(app_id: &AppID, fd: std::os::fd::OwnedFd) -> Result<
5656
std_stream.set_nonblocking(true)?;
5757
let mut stream = tokio::net::UnixStream::from_std(std_stream)?;
5858

59+
if collection.is_locked().await? {
60+
collection.unlock(None).await?;
61+
}
62+
5963
if let Some(item) = collection.search_items(&attributes).await?.first() {
6064
stream.write_all(&item.secret().await?).await?;
6165
} else {

0 commit comments

Comments
 (0)