diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-08-19 23:24:21 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-08-19 23:24:21 -0500 |
| commit | 23e6cfefe58053e4b5ebad9001f436506ac8c437 (patch) | |
| tree | 91f758f75877f61b7c750367ae16bc0253576439 /src | |
| parent | 0c2ac132483bcc270760d0902fb0e8e6c68f440e (diff) | |
| download | slskd-23e6cfefe58053e4b5ebad9001f436506ac8c437.tar.gz | |
remove threading mode selection
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Program.cs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 2a7e93e2..c8a5efe0 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -496,21 +496,12 @@ namespace slskd Log.Debug("SQLite was compiled with THREADSAFE={Mode}", threadSafe); - var selectedThreadingMode = OptionsAtStartup.Flags.SQLiteThreadingMode; - - if (selectedThreadingMode != SQLitePCL.raw.SQLITE_CONFIG_MULTITHREAD && selectedThreadingMode != SQLitePCL.raw.SQLITE_CONFIG_SERIALIZED) - { - throw new InvalidOperationException($"Invalid SQLite threading mode {selectedThreadingMode}; select either MULTITHREADED (2) or SERIALIZED (3)"); - } - - var modeNames = new[] { "MULTITHREADED", "SERIALIZED" }; - - if (SQLitePCL.raw.sqlite3_config(selectedThreadingMode) != SQLitePCL.raw.SQLITE_OK) + if (SQLitePCL.raw.sqlite3_config(SQLitePCL.raw.SQLITE_CONFIG_SERIALIZED) != 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."); + throw new InvalidOperationException($"SQLite threading mode could not be set to . 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 - 2], selectedThreadingMode); + Log.Debug("SQLite threading mode set to {Mode} ({Number})", "SERIALIZED", SQLitePCL.raw.SQLITE_CONFIG_SERIALIZED); } private static IServiceCollection ConfigureAspDotNetServices(this IServiceCollection services) |
