Handle host lookup failure
This commit is contained in:
parent
7a0c38877c
commit
46dc429d73
1 changed files with 5 additions and 1 deletions
|
@ -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 = [];
|
||||
|
|
Loading…
Add table
Reference in a new issue