Imported Upstream version 6.8.0.95

Former-commit-id: f9d71b03d311b37638cba87ec50db50e194b00ba
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-01-11 08:48:52 +00:00
parent 0721831ed1
commit 6ab90dd8aa
53 changed files with 134 additions and 47 deletions

View File

@ -187,6 +187,15 @@ namespace System.Net.Sockets
// Keep track of this because it will be overwritten by AttemptConnection
SocketError currentFailure = args.SocketError;
#if MONO
// Make sure we're always resetting the Mono-specific `in_progress` field when
// re-attempting a connection.
// If a previous connection failed asynchronously, then it will already have been
// resetted, but not on synchronous connection failures (such as for instance, the
// host not supporting IPv6 or the network being down).
// This should fix https://github.com/mono/mono/issues/18030.
args.in_progress = 0;
#endif
Exception connectException = AttemptConnection();
if (connectException == null)