diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-25 02:17:56 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-25 02:17:56 +0000 |
commit | 62755f824d5d77d0d110d3cc4e3f7614632e29ee (patch) | |
tree | f328efdc69b6c022084e5f6be5f3a42a17088a8a /base | |
parent | 33c141aefc29ca5523cb2d462835969b6b3a5bf3 (diff) | |
download | chromium_src-62755f824d5d77d0d110d3cc4e3f7614632e29ee.zip chromium_src-62755f824d5d77d0d110d3cc4e3f7614632e29ee.tar.gz chromium_src-62755f824d5d77d0d110d3cc4e3f7614632e29ee.tar.bz2 |
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.
R=sergeyu@chromium.org,willchan@chromium.org
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
Diffstat (limited to 'base')
-rw-r--r-- | base/win/object_watcher.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/win/object_watcher.h b/base/win/object_watcher.h index 4cc6090..7e2de77 100644 --- a/base/win/object_watcher.h +++ b/base/win/object_watcher.h @@ -48,7 +48,7 @@ class BASE_API ObjectWatcher : public MessageLoop::DestructionObserver { public: virtual ~Delegate() {} // Called from the MessageLoop when a signaled object is detected. To - // continue watching the object, AddWatch must be called again. + // continue watching the object, StartWatching must be called again. virtual void OnObjectSignaled(HANDLE object) = 0; }; |