Skip to content

Commit 7cb1399

Browse files
committed
Apply extra 250ms after waitForUploadPort to all platforms
1 parent 7a535d9 commit 7cb1399

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

+5-6
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,11 @@ public boolean uploadUsingPreferences(File sourcePath, String buildPath, String
136136
// it happened within 250 ms. So we wait until the reset should
137137
// have already occured before we start scanning.
138138
actualUploadPort = waitForUploadPort(userSelectedUploadPort, before);
139-
140-
if (OSUtils.isMacOS()) {
141-
// on OS X, if the port is opened too quickly after it is detected,
142-
// a "Resource busy" error occurs, add a delay to workaround this
143-
Thread.sleep(250);
144-
}
139+
140+
// on OS X, if the port is opened too quickly after it is detected,
141+
// a "Resource busy" error occurs, add a delay to workaround this,
142+
// apply to other platforms as well.
143+
Thread.sleep(250);
145144
}
146145
} catch (SerialException e) {
147146
throw new RunnerException(e);

0 commit comments

Comments
 (0)