Skip to content

Commit 59f215a

Browse files
committed
Fixed obsoletion warnings
1 parent 0354a8d commit 59f215a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

samples/TestFtpServer/Program.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using FubarDev.FtpServer.AccountManagement.Directories.RootPerUser;
1717
using FubarDev.FtpServer.AccountManagement.Directories.SingleRootWithoutHome;
1818
using FubarDev.FtpServer.Authentication;
19+
using FubarDev.FtpServer.Features;
1920
using FubarDev.FtpServer.FileSystem;
2021
using FubarDev.FtpServer.FileSystem.DotNet;
2122
using FubarDev.FtpServer.FileSystem.GoogleDrive;
@@ -356,13 +357,14 @@ private static IServiceCollection CreateServices(TestFtpServerOptions options)
356357
// Use an implicit SSL connection (without the AUTHTLS command)
357358
ftpServer.ConfigureConnection += (s, e) =>
358359
{
360+
var secureConnectionFeature = e.Connection.Features.Get<ISecureConnectionFeature>();
359361
var sslStream = sslStreamWrapperFactory.WrapStreamAsync(
360-
e.Connection.OriginalStream,
362+
secureConnectionFeature.OriginalStream,
361363
false,
362364
authTlsOptions.Value.ServerCertificate,
363365
CancellationToken.None)
364366
.Result;
365-
e.Connection.SocketStream = sslStream;
367+
secureConnectionFeature.SocketStream = sslStream;
366368
};
367369

368370
return ftpServer;

0 commit comments

Comments
 (0)