Skip to content

Commit 8098196

Browse files
authored
Kill programmer if upload takes more than 5 minutes
Fixes #5672
1 parent e48553e commit 8098196

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arduino-core/src/cc/arduino/packages/Uploader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ protected boolean executeUploadCommand(String command[]) throws Exception {
132132
new MessageSiphon(process.getErrorStream(), this, 100);
133133

134134
// wait for the process to finish, but not forever
135-
// kill the flasher process after 2 minutes to avoid 100% cpu spinning
136-
if (!process.waitFor(2, TimeUnit.MINUTES)) {
135+
// kill the flasher process after 5 minutes to avoid 100% cpu spinning
136+
if (!process.waitFor(5, TimeUnit.MINUTES)) {
137137
process.destroyForcibly();
138138
}
139139
if (!process.isAlive()) {

0 commit comments

Comments
 (0)