[socket] Fix race on SocketAsyncResult (#4389)
authorLudovic Henry <ludovic@xamarin.com>
Thu, 16 Feb 2017 01:46:26 +0000 (20:46 -0500)
committerGitHub <noreply@github.com>
Thu, 16 Feb 2017 01:46:26 +0000 (20:46 -0500)
commit5f7e9663af62fd54f4824289d3b86052a62aa008
tree20d0518a4c34c7fbd7d45545666d567a4e3637eb
parenta4df7d4923aa6a6e67f7044e4682e71c598fb312
[socket] Fix race on SocketAsyncResult (#4389)

It might be possible that the callback modifies the current SocketAsyncResult via the Init method. We observe it with AcceptAsync with a ReceiveAsync in the callback.
mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs