Handle host lookup failure

This commit is contained in:
Simon Kornblith 2011-08-28 19:58:02 +00:00
parent 7a0c38877c
commit 46dc429d73

View file

@ -870,7 +870,11 @@ Zotero.Proxies.DNS = new function() {
var dns = Components.classes["@mozilla.org/network/dns-service;1"]
.getService(Components.interfaces.nsIDNSService);
myHostName = dns.myHostName;
var record = dns.resolve(myHostName, null);
try {
var record = dns.resolve(myHostName, null);
} catch(e) {
return [];
}
// get IPs
var ips = [];