Skip to content

Commit 09fbef6

Browse files
sandeepmistryfacchinm
authored andcommitted
Increase wait for upload port timeout to 5s on all platforms
OS X 10.11 seems to be slower, increasing timeout to 5s on all platforms to keep things simple.
1 parent a4ed0fa commit 09fbef6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,10 @@ private String waitForUploadPort(String uploadPort, List<String> before) throws
257257
Thread.sleep(250);
258258
elapsed += 250;
259259

260-
// On Windows, it can take a long time for the port to disappear and
261-
// come back, so use a longer time out before assuming that the
262-
// selected
263-
// port is the bootloader (not the sketch).
264-
if (((!OSUtils.isWindows() && elapsed >= 500) || elapsed >= 5000) && now.contains(uploadPort)) {
260+
// On Windows and OS X, it can take a few seconds for the port to disappear and
261+
// come back, so use a time out before assuming that the selected port is the
262+
// bootloader (not the sketch).
263+
if (elapsed >= 5000 && now.contains(uploadPort)) {
265264
if (verbose)
266265
System.out.println("Uploading using selected port: " + uploadPort);
267266
return uploadPort;

0 commit comments

Comments
 (0)