aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-08-19 13:21:52 -0500
committerJP Dillingham <jp@dillingham.me>2022-08-19 13:21:52 -0500
commitb75728d54f37dde6d53a9a412b68e827604a3c6a (patch)
tree4c20df17183d59b64edd7d4b341ac8a4eac677e3 /src
parent036227ad2f4b99556e23d6a64d30f031510cd8c4 (diff)
downloadslskd-b75728d54f37dde6d53a9a412b68e827604a3c6a.tar.gz
fix startup crash
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Program.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index ca583bde..2a7e93e2 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -503,14 +503,14 @@ namespace slskd
throw new InvalidOperationException($"Invalid SQLite threading mode {selectedThreadingMode}; select either MULTITHREADED (2) or SERIALIZED (3)");
}
- var modeNames = new[] { null, "MULTITHREADED", "SERIALIZED" };
+ var modeNames = new[] { "MULTITHREADED", "SERIALIZED" };
if (SQLitePCL.raw.sqlite3_config(selectedThreadingMode) != SQLitePCL.raw.SQLITE_OK)
{
throw new InvalidOperationException($"SQLite config could not be set to {modeNames[selectedThreadingMode]}. Please create a GitHub issue to report this and include details about your environment.");
}
- Log.Debug("SQLite threading mode set to {Mode} ({Number})", modeNames[selectedThreadingMode], selectedThreadingMode);
+ Log.Debug("SQLite threading mode set to {Mode} ({Number})", modeNames[selectedThreadingMode - 2], selectedThreadingMode);
}
private static IServiceCollection ConfigureAspDotNetServices(this IServiceCollection services)