V11: Use SqLiteException instead of SqlException in SqliteDistributedLockingMechanism & fix E2E tests (#13293)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Globalization;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -84,7 +83,7 @@ public class SqliteDistributedLockingMechanism : IDistributedLockingMechanism
|
||||
throw new ArgumentOutOfRangeException(nameof(lockType), lockType, @"Unsupported lockType");
|
||||
}
|
||||
}
|
||||
catch (SqlException ex) when (ex.Number == 1222)
|
||||
catch (SqliteException ex) when (ex.SqliteErrorCode == SQLitePCL.raw.SQLITE_BUSY)
|
||||
{
|
||||
if (LockType == DistributedLockType.ReadLock)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user