mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
catch Errors as well
This commit is contained in:
parent
bbfa74ff1c
commit
d824a19112
@ -17,7 +17,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static java.util.logging.Level.*;
|
||||
import static java.util.logging.Level.SEVERE;
|
||||
|
||||
/**
|
||||
* PingerRegistry
|
||||
@ -87,7 +87,7 @@ public class PingerRegistry {
|
||||
Pinger icmpPinger = createPinger(scannerConfig.selectedPinger, 250);
|
||||
icmpPinger.ping(new ScanningSubject(InetAddress.getLocalHost()), 1);
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (Throwable e) {
|
||||
LOG.info("ICMP pinger failed: " + e);
|
||||
// win32 will use native pinger, all others get combined UDP+TCP, which doesn't require special privileges
|
||||
scannerConfig.selectedPinger = Platform.WINDOWS && !Platform.ARCH_64 ? "pinger.windows" : "pinger.combined";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user