- InetAddress[] mx = SMTP.getMailExchangerIPs(host);
- for(int i=0; i<mx.length; i++) {
- try { if (NetworkInterface.getByInetAddress(mx[i]) != null) { return true; } }
- catch (Exception e) { /* DELIBERATE */ }
+ synchronized(local) {
+ if (local.contains(host)) return true;
+ InetAddress[] mx = SMTP.getMailExchangerIPs(host);
+ for(int i=0; i<mx.length; i++) {
+ try { if (NetworkInterface.getByInetAddress(mx[i]) != null) {
+ local.add(host);
+ return true;
+ } } catch (Exception e) { /* DELIBERATE */ }
+ }