Skip to content

Commit f92dcc3

Browse files
authored
Update events.rs
fix lock method
1 parent a958f6e commit f92dcc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core-dump-composer/src/events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl CoreEvent {
8787
pub fn write_event(&self, eventlocation: &str) -> Result<(), anyhow::Error> {
8888
let full_path = format!("{}/{}-event.json", eventlocation, self.uuid);
8989
let file = File::create(full_path)?;
90-
file.lock(FileLockMode::Exclusive)?;
90+
AdvisoryFileLock.lock(&file, FileLockMode::Exclusive)?;
9191
serde_json::to_writer(&file, &self)?;
9292
file.unlock()?;
9393
Ok(())

0 commit comments

Comments
 (0)