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