File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
arduino-core/src/cc/arduino/packages Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2626import cc .arduino .Constants ;
2727import cc .arduino .UpdatableBoardsLibsFakeURLsHandler ;
2828import cc .arduino .UploaderUtils ;
29+ import cc .arduino .packages .Uploader ;
2930import cc .arduino .contributions .*;
3031import cc .arduino .contributions .libraries .*;
3132import cc .arduino .contributions .libraries .ui .LibraryManagerUI ;
@@ -961,6 +962,14 @@ public boolean handleQuit() {
961962 // ignore
962963 }
963964
965+ // kill uploader (if still alive)
966+ UploaderUtils uploaderInstance = new UploaderUtils ();
967+ Uploader uploader = uploaderInstance .getUploaderByPreferences (false );
968+ if (uploader != null && uploader .programmerPid != null && uploader .programmerPid .isAlive ()) {
969+ // kill the stuck programmer
970+ uploader .programmerPid .destroyForcibly ();
971+ }
972+
964973 if (handleQuitEach ()) {
965974 // Save out the current prefs state
966975 PreferencesData .save ();
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public String getAuthorizationKey() {
106106 }
107107
108108 // static field for last executed programmer process ID
109- static protected Process programmerPid ;
109+ static public Process programmerPid ;
110110
111111 protected boolean executeUploadCommand (Collection <String > command ) throws Exception {
112112 return executeUploadCommand (command .toArray (new String [command .size ()]));
You can’t perform that action at this time.
0 commit comments