-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuthenticateAsClientAsync doesn't respect ReadTimeout in a certain scenario #1536
Comments
Thanks for this report. Let's take it apart into separate pieces:
Let's check that SSL Buffering is actually turned off. There should be a message in the log (verbose!) stating that no SSL Buffering is actually being used (because->.NET 8). So your turning this off yourself "is overkill". And since this doesn't help for your problem... I understand.
Same for me
So, in the end, we should perhaps simply use AuthenticateAsClient on the SyncClient in all cases? I think so. And if that were so, why do we actually think we need to turn SSL Buffering off (at least, in the SYNC client)? Looks like some testing is in order. |
Well the decision is up to the author I think here.
|
There is no provision for CancellationToken(s) in the entirety of the SyncClient. Thus using AuthenticateAsClientAsync seems problematic, so much for that. So two open problems, in my mind: SyncClient: Remove usage of AuthenticateAsClientAsync overall. |
Correct Auth as Client call see #1536
I would like you to test the current master as to the problems you reported. I have just merged a first take on the SYNC side of this topic. Can do? |
FTP Server OS: Windows
FTP Server Type: FileZilla
Client Computer OS: Windows
FluentFTP Version: 49.0.2
Framework: .NET 8
If I try to connect using ftp & ftps it perfectly works. Though ftpes for some reason somehow blocked in my network. Though directly from the machine I can connect.
The issue is in the following code:
Looks like
AuthenticateAsClientAsync
doesn't default respect ReadTimeout of 15 seconds and hangs forever. On the other handAuthenticateAsClient
perfectly works.I can't find any hints in the documentation on why
AuthenticateAsClientAsync
can behave differently. But I don't see any benefits here to use this function overAuthenticateAsClient
as the code is completely sync.Here are my differences from default client config (for ftpes):
I also found this #682 where looks like SslBuffering.Off was a worarkound. This no longer works.
If it helps here's what i see in console logs:
Using a CancellationToken on AuthenticateAsClientAsync also works. Ideally I think API should be completely async with CancellationToken support starting from Connect()
Also worth mentioning that in documentation this function has no timeout exception apart from
OperationCanceledException
. Implicitly it looks like it is not supposed to respect any timeouts. Though this is also true forAuthenticateAsClient
The text was updated successfully, but these errors were encountered: