Skip to content

Commit de41265

Browse files
committed
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 26e25a4 commit de41265

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
@@ -247,11 +247,10 @@ private String waitForUploadPort(String uploadPort, List<String> before) throws
247247
Thread.sleep(250);
248248
elapsed += 250;
249249

250-
// On Windows, it can take a long time for the port to disappear and
251-
// come back, so use a longer time out before assuming that the
252-
// selected
253-
// port is the bootloader (not the sketch).
254-
if (((!OSUtils.isWindows() && elapsed >= 500) || elapsed >= 5000) && now.contains(uploadPort)) {
250+
// On Windows and OS X, it can take a few seconds for the port to disappear and
251+
// come back, so use a time out before assuming that the selected port is the
252+
// bootloader (not the sketch).
253+
if (elapsed >= 5000 && now.contains(uploadPort)) {
255254
if (verbose)
256255
System.out.println("Uploading using selected port: " + uploadPort);
257256
return uploadPort;

0 commit comments

Comments
 (0)