diff options
Diffstat (limited to 'net/base/network_change_notifier_win.cc')
| -rw-r--r-- | net/base/network_change_notifier_win.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/base/network_change_notifier_win.cc b/net/base/network_change_notifier_win.cc index 135905e..77a72b0 100644 --- a/net/base/network_change_notifier_win.cc +++ b/net/base/network_change_notifier_win.cc @@ -54,7 +54,6 @@ class NetworkChangeNotifierWin::DnsConfigServiceThread : public base::Thread { NetworkChangeNotifierWin::NetworkChangeNotifierWin() : NetworkChangeNotifier(NetworkChangeCalculatorParamsWin()), is_watching_(false), - network_change_event_handle_(NULL), sequential_failures_(0), weak_factory_(this), dns_config_service_thread_(new DnsConfigServiceThread()), @@ -223,15 +222,10 @@ void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) { DCHECK(is_watching_); is_watching_ = false; - DWORD bytes; - BOOL network_changed = GetOverlappedResult(network_change_event_handle_, &addr_overlapped_, &bytes, TRUE); - // Start watching for the next address change. WatchForAddressChange(); - // If network_changed is 0 an error occured (e.g. GetLastError() = 995 = ERROR_OPERATION_ABORTED). - if (network_changed != 0) - NotifyObservers(); + NotifyObservers(); } void NetworkChangeNotifierWin::NotifyObservers() { @@ -301,8 +295,8 @@ bool NetworkChangeNotifierWin::WatchForAddressChangeInternal() { base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); } - - DWORD ret = NotifyAddrChange(&network_change_event_handle_, &addr_overlapped_); + HANDLE handle = NULL; + DWORD ret = NotifyAddrChange(&handle, &addr_overlapped_); if (ret != ERROR_IO_PENDING) return false; |
