diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-08-19 23:49:32 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-19 23:49:32 -0500 |
| commit | 686717cfaafdcfddae9733f2ebdae178aa3fa8c0 (patch) | |
| tree | 59eb96f4ff65e3d740b63656dc5536827e4df8c5 /src/slskd/Program.cs | |
| parent | 11759b4e5a59f8ed59464331ea5451e5a7a922d4 (diff) | |
| parent | 61b439a7b417aaf4a7233f9f1c4a2430469ad031 (diff) | |
| download | slskd-686717cfaafdcfddae9733f2ebdae178aa3fa8c0.tar.gz | |
Merge pull request #606 from slskd/sync
Synchronize state and progress updates of transfer records
Diffstat (limited to 'src/slskd/Program.cs')
| -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) |
