[socket] Fix race on SocketAsyncResult (#4389)