maildir: drop mutexes before calling add_path_to_index

embed
Manos Pitsidianakis 2019-07-30 19:24:35 +03:00
parent 572944e917
commit 7592e66d6a
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 4 additions and 0 deletions

View File

@ -262,6 +262,8 @@ impl MailBackend for MaildirType {
*v = pathbuf.clone().into();
*k
} else {
drop(index_lock);
drop(hash_indexes_lock);
/* Did we just miss a Create event? In any case, create
* envelope. */
if let Some(env) = add_path_to_index(
@ -365,6 +367,8 @@ impl MailBackend for MaildirType {
.unwrap()
.to_path_buf();
debug!("filename = {:?}", file_name);
drop(index_lock);
drop(hash_indexes_lock);
if let Some(env) = add_path_to_index(
&hash_indexes,
folder_hash,