1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Network and Serial board ports discovery is now asynchronous, hence it does not block "tools" menu any more.

Fixes #2788
This commit is contained in:
Federico Fissore
2015-03-24 12:50:26 +01:00
parent 046f335d5f
commit 70bbe398ab
7 changed files with 270 additions and 128 deletions

View File

@ -11,7 +11,7 @@ public abstract class NetUtils {
private static boolean isReachableByEcho(InetAddress address) {
try {
return address.isReachable(100);
return address.isReachable(300);
} catch (IOException e) {
return false;
}
@ -38,7 +38,7 @@ public abstract class NetUtils {
Socket socket = null;
try {
socket = new Socket();
socket.connect(new InetSocketAddress(address, port), 300);
socket.connect(new InetSocketAddress(address, port), 1000);
return true;
} catch (IOException e) {
return false;