1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00

fix NPE if CLI upload is used

This commit is contained in:
Martino Facchin 2017-09-30 13:16:44 +02:00
parent 52c829fb0d
commit 8363831dd4

View File

@ -153,7 +153,9 @@ public class NetworkDiscovery implements Discovery, ServiceListener, Runnable {
@Override @Override
public void stop() { public void stop() {
if (jmdns != null) {
jmdns.unregisterAllServices(); jmdns.unregisterAllServices();
}
// we don't close the JmmDNS instance as it's too slow // we don't close the JmmDNS instance as it's too slow
/* /*
try { try {
@ -162,8 +164,10 @@ public class NetworkDiscovery implements Discovery, ServiceListener, Runnable {
e.printStackTrace(); e.printStackTrace();
} }
*/ */
if (reachabilityTimer != null) {
reachabilityTimer.cancel(); reachabilityTimer.cancel();
} }
}
@Override @Override
public List<BoardPort> listDiscoveredBoards() { public List<BoardPort> listDiscoveredBoards() {