bug 1038304 - websockets offline hang r=sworkman

This commit is contained in:
Patrick McManus
2014-07-17 11:56:38 -04:00
parent 622ee5301d
commit 77d41a856d
3 changed files with 54 additions and 3 deletions

View File

@@ -2425,11 +2425,16 @@ WebSocketChannel::OnProxyAvailable(nsICancelable *aRequest, nsIURI *aURI,
LOG(("WebSocket OnProxyAvailable [%p] Proxy found skip DNS lookup\n", this));
// call DNS callback directly without DNS resolver
OnLookupComplete(nullptr, nullptr, NS_ERROR_FAILURE);
return NS_OK;
} else {
LOG(("WebSocketChannel::OnProxyAvailable[%] checking DNS resolution\n", this));
nsresult rv = DoAdmissionDNS();
if (NS_FAILED(rv)) {
LOG(("WebSocket OnProxyAvailable [%p] DNS lookup failed\n", this));
// call DNS callback directly without DNS resolver
OnLookupComplete(nullptr, nullptr, NS_ERROR_FAILURE);
}
}
LOG(("WebSocketChannel::OnProxyAvailable[%] checking DNS resolution\n", this));
DoAdmissionDNS();
return NS_OK;
}