1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

Kill programmer if upload takes more than 5 minutes

Fixes #5672
This commit is contained in:
Martino Facchin 2016-12-15 18:57:21 +01:00 committed by GitHub
parent e48553ec57
commit 8098196083

View File

@ -132,8 +132,8 @@ public abstract class Uploader implements MessageConsumer {
new MessageSiphon(process.getErrorStream(), this, 100); new MessageSiphon(process.getErrorStream(), this, 100);
// wait for the process to finish, but not forever // wait for the process to finish, but not forever
// kill the flasher process after 2 minutes to avoid 100% cpu spinning // kill the flasher process after 5 minutes to avoid 100% cpu spinning
if (!process.waitFor(2, TimeUnit.MINUTES)) { if (!process.waitFor(5, TimeUnit.MINUTES)) {
process.destroyForcibly(); process.destroyForcibly();
} }
if (!process.isAlive()) { if (!process.isAlive()) {