We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddc729f commit 7424613Copy full SHA for 7424613
src/libraries/System.Net.Requests/src/System/Net/FtpWebRequest.cs
@@ -967,15 +967,11 @@ private Exception TranslateConnectException(Exception e)
967
968
private async void CreateConnectionAsync()
969
{
970
- string hostname = _uri.Host;
971
- int port = _uri.Port;
972
-
973
- TcpClient client = new TcpClient();
974
975
object result;
976
try
977
978
- await client.ConnectAsync(hostname, port).ConfigureAwait(false);
+ var client = new TcpClient();
+ await client.ConnectAsync(_uri.Host, _uri.Port).ConfigureAwait(false);
979
result = new FtpControlStream(client);
980
}
981
catch (Exception e)
0 commit comments