diff --git a/src/FubarDev.FtpServer/PasvListenerFactory.cs b/src/FubarDev.FtpServer/PasvListenerFactory.cs index e5dd2cde..8249ae8d 100644 --- a/src/FubarDev.FtpServer/PasvListenerFactory.cs +++ b/src/FubarDev.FtpServer/PasvListenerFactory.cs @@ -9,6 +9,8 @@ using System.Net.Sockets; using System.Threading.Tasks; +using JetBrains.Annotations; + using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; @@ -19,6 +21,7 @@ namespace FubarDev.FtpServer /// public class PasvListenerFactory : IPasvListenerFactory { + [CanBeNull] private readonly ILogger _log; private readonly int _pasvMinPort; @@ -33,7 +36,7 @@ public class PasvListenerFactory : IPasvListenerFactory /// /// FTPServer options. /// Logger instance. - public PasvListenerFactory(IOptions serverOptions, ILogger logger) + public PasvListenerFactory(IOptions serverOptions, ILogger logger = null) { _log = logger; if (serverOptions.Value.PasvMinPort > 1023 && @@ -41,7 +44,7 @@ public PasvListenerFactory(IOptions serverOptions, ILogger