[Socket] Fix Socket.BeginConnect to multiple IPAddress (#4960)
authorLudovic Henry <ludovic@xamarin.com>
Wed, 31 May 2017 22:22:27 +0000 (18:22 -0400)
committerGitHub <noreply@github.com>
Wed, 31 May 2017 22:22:27 +0000 (18:22 -0400)
commit5b88ecbe0b98659f65fd034556a7347f6c011c30
tree05786219aaaf10a280fed2f6170d15ba7b25642d
parenta17afc056be738c15761819044fc8eb021b4e07d
[Socket] Fix Socket.BeginConnect to multiple IPAddress (#4960)

We would previously mix 2 SocketAsyncResult, and in case we would succeed asynchronously, we would return one that would not be updated afterwards.

The solution consists in using only 1 SocketAsyncResult that we ensure to update accordingly.
mcs/class/System/System.Net.Sockets/Socket.cs