Synchronize access to socket structures

Bug: 447672