Fix possible w-lock panic
For a detailed explanation on the issue this commit tries to solve, have
a look at
7b5d37a039
which explains the issue in detail.
This commit is contained in:
parent
84ae516dc3
commit
e37316f3f4
1 changed files with 15 additions and 12 deletions
|
@ -686,6 +686,7 @@ impl Store {
|
||||||
.map_err_into(SEK::MoveByIdCallError)
|
.map_err_into(SEK::MoveByIdCallError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
let hsmap = self.entries.write();
|
let hsmap = self.entries.write();
|
||||||
if hsmap.is_err() {
|
if hsmap.is_err() {
|
||||||
return Err(SE::new(SEK::LockPoisoned, None))
|
return Err(SE::new(SEK::LockPoisoned, None))
|
||||||
|
@ -701,6 +702,8 @@ impl Store {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
self.execute_hooks_for_id(self.pre_move_aspects.clone(), &new_id)
|
self.execute_hooks_for_id(self.pre_move_aspects.clone(), &new_id)
|
||||||
.map_err_into(SEK::PostHookExecuteError)
|
.map_err_into(SEK::PostHookExecuteError)
|
||||||
.map_err_into(SEK::HookExecutionError)
|
.map_err_into(SEK::HookExecutionError)
|
||||||
|
|
Loading…
Reference in a new issue