Skip to content

Commit

Permalink
Fix AbandonedMutexException when a process crashes in shared mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lbnascimento committed Apr 29, 2020
1 parent 16e9f84 commit be1becd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LiteDB/Client/Shared/SharedEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ private void OpenDatabase()

if (_stack == 1)
{
_mutex.WaitOne();
try
{
_mutex.WaitOne();
}
catch (AbandonedMutexException) { }

try
{
Expand Down

1 comment on commit be1becd

@lbnascimento
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for #1656

Please # to comment.