From 16c3c2f9ef9ad03c0428171541e11708b3e2ff9c Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 2 Jan 2020 19:46:32 +0000 Subject: [PATCH] Catch database concurrency exception. --- DiscImageChef.Core/Statistics.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DiscImageChef.Core/Statistics.cs b/DiscImageChef.Core/Statistics.cs index 5c4080e7d..383d94269 100644 --- a/DiscImageChef.Core/Statistics.cs +++ b/DiscImageChef.Core/Statistics.cs @@ -43,6 +43,7 @@ using DiscImageChef.CommonTypes.Interop; using DiscImageChef.CommonTypes.Metadata; using DiscImageChef.Database; using DiscImageChef.Database.Models; +using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using Device = DiscImageChef.Devices.Device; using MediaType = DiscImageChef.CommonTypes.MediaType; @@ -1067,6 +1068,10 @@ namespace DiscImageChef.Core { // Can't connect to the server, do nothing } + catch(DbUpdateConcurrencyException) + { + // Ignore db concurrency errors + } // ReSharper disable once RedundantCatchClause catch