From 6158bd564f058ac09d7d03d388a078e5fd2914ac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 9 Feb 2016 01:31:00 +0100 Subject: [PATCH] Bug 1246850 - check the NotifyIpInterfaceChange() return code, r=mcmanus --- netwerk/system/win32/nsNotifyAddrListener.cpp | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/netwerk/system/win32/nsNotifyAddrListener.cpp b/netwerk/system/win32/nsNotifyAddrListener.cpp index 83318a9108b..68d830ea88b 100644 --- a/netwerk/system/win32/nsNotifyAddrListener.cpp +++ b/netwerk/system/win32/nsNotifyAddrListener.cpp @@ -220,16 +220,21 @@ nsNotifyAddrListener::Run() false, // no initial notification &interfacechange); - do { - ret = WaitForSingleObject(mCheckEvent, waitTime); - if (!mShutdown) { - waitTime = nextCoalesceWaitTime(); - } - else { - break; - } - } while (ret != WAIT_FAILED); - sCancelMibChangeNotify2(interfacechange); + if (ret == NO_ERROR) { + do { + ret = WaitForSingleObject(mCheckEvent, waitTime); + if (!mShutdown) { + waitTime = nextCoalesceWaitTime(); + } + else { + break; + } + } while (ret != WAIT_FAILED); + sCancelMibChangeNotify2(interfacechange); + } else { + LOG(("Link Monitor: sNotifyIpInterfaceChange returned %d\n", + (int)ret)); + } } return NS_OK; }