From 7cb1399381219952f752f3ea43ad1d83f2139fee Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Thu, 10 Mar 2016 09:44:24 -0500 Subject: [PATCH] Apply extra 250ms after waitForUploadPort to all platforms --- .../cc/arduino/packages/uploaders/SerialUploader.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java index 30f6fbdf3..38ea95784 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java @@ -136,12 +136,11 @@ public class SerialUploader extends Uploader { // it happened within 250 ms. So we wait until the reset should // have already occured before we start scanning. actualUploadPort = waitForUploadPort(userSelectedUploadPort, before); - - if (OSUtils.isMacOS()) { - // on OS X, if the port is opened too quickly after it is detected, - // a "Resource busy" error occurs, add a delay to workaround this - Thread.sleep(250); - } + + // on OS X, if the port is opened too quickly after it is detected, + // a "Resource busy" error occurs, add a delay to workaround this, + // apply to other platforms as well. + Thread.sleep(250); } } catch (SerialException e) { throw new RunnerException(e);