TCPServerSocketLibevent should call StopWatchingFileDescriptor()
when Accept() completes asynchronously (because Accept() calls
WatchFileDescriptor() in persistent mode) or before it closes
socket_. This matches what TCPClientSocketLibevent does.
Without this fix, the TCPServerSocketTest.Accept2Connections unit
test may crash in accept_callback.WaitForResult() for some message
loop scheduling policies because two connections are ready to be
accepted but only one accept_socket_ is provided.
Fix a comment typo in object_watcher.h.
Avoid a redundant StopWatchingFileDescriptor call in
TCPClientSocketLibevent.
[email protected],[email protected]
BUG=none
TEST=covered by existing unit tests
Review URL: http://codereview.chromium.org/7239018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90476 0039d316-1c4b-4281-b951-d872f2087c98
3 files changed