Skip to content

Commit

Permalink
Kill programmer if upload takes more than 5 minutes
Browse files Browse the repository at this point in the history
Fixes #5672
  • Loading branch information
facchinm authored Dec 15, 2016
1 parent e48553e commit 8098196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arduino-core/src/cc/arduino/packages/Uploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ protected boolean executeUploadCommand(String command[]) throws Exception {
new MessageSiphon(process.getErrorStream(), this, 100);

// wait for the process to finish, but not forever
// kill the flasher process after 2 minutes to avoid 100% cpu spinning
if (!process.waitFor(2, TimeUnit.MINUTES)) {
// kill the flasher process after 5 minutes to avoid 100% cpu spinning
if (!process.waitFor(5, TimeUnit.MINUTES)) {
process.destroyForcibly();
}
if (!process.isAlive()) {
Expand Down

0 comments on commit 8098196

Please sign in to comment.