diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-07-16 08:12:05 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-07-16 08:12:05 -0500 |
| commit | 9f1443ff4869a2685e855e5b09090c2b375dea5b (patch) | |
| tree | c077aa67223a7088ffb05f054548d0390b73cdd0 /src/slskd/Integrations/FTP/FTPService.cs | |
| parent | 2c772284155b99cbe16707e8f990466a868c3af6 (diff) | |
| download | slskd-9f1443ff4869a2685e855e5b09090c2b375dea5b.tar.gz | |
make FTP services singletons again
Diffstat (limited to 'src/slskd/Integrations/FTP/FTPService.cs')
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPService.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs index fdd04d56..becf1a12 100644 --- a/src/slskd/Integrations/FTP/FTPService.cs +++ b/src/slskd/Integrations/FTP/FTPService.cs @@ -36,22 +36,22 @@ namespace slskd.Integrations.FTP /// Initializes a new instance of the <see cref="FTPService"/> class. /// </summary> /// <param name="ftpClientFactory">The FTP client factory to use.</param> - /// <param name="optionsSnapshot">The options snapshot used to derive application options.</param> + /// <param name="optionsMonitor">The options monitor used to derive application options.</param> /// <param name="log">The logger.</param> public FTPService( IFTPClientFactory ftpClientFactory, - IOptionsSnapshot<Options> optionsSnapshot, + IOptionsMonitor<Options> optionsMonitor, ILogger<FTPService> log) { Factory = ftpClientFactory; - OptionsSnapshot = optionsSnapshot; + OptionsMonitor = optionsMonitor; Log = log; } private IFTPClientFactory Factory { get; set; } - private FTPOptions FTPOptions => OptionsSnapshot.Value.Integration.FTP; + private FTPOptions FTPOptions => OptionsMonitor.CurrentValue.Integration.FTP; private ILogger<FTPService> Log { get; set; } - private IOptionsSnapshot<Options> OptionsSnapshot { get; } + private IOptionsMonitor<Options> OptionsMonitor { get; } /// <summary> /// Uploads the specified <paramref name="filename"/> to the configured FTP server. |
