1.1 --- a/nodejs/manifest.mf Sun Jun 05 12:29:14 2011 +0200
1.2 +++ b/nodejs/manifest.mf Sun Jun 05 17:21:05 2011 -0400
1.3 @@ -3,5 +3,5 @@
1.4 OpenIDE-Module-Layer: org/netbeans/modules/nodejs/layer.xml
1.5 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/nodejs/Bundle.properties
1.6 OpenIDE-Module-Requires: org.openide.modules.os.Unix
1.7 -OpenIDE-Module-Specification-Version: 1.11
1.8 +OpenIDE-Module-Specification-Version: 1.12
1.9
2.1 --- a/nodejs/src/org/netbeans/modules/nodejs/DefaultExectable.java Sun Jun 05 12:29:14 2011 +0200
2.2 +++ b/nodejs/src/org/netbeans/modules/nodejs/DefaultExectable.java Sun Jun 05 17:21:05 2011 -0400
2.3 @@ -147,16 +147,11 @@
2.4
2.5 @Override
2.6 protected Future<Integer> doRun(final FileObject file, String args) throws IOException {
2.7 - Rerunner old = null;
2.8 for (Rerunner r : runners) {
2.9 if (file.equals(r.file)) {
2.10 - old = r;
2.11 - break;
2.12 + r.stopOldProcessIfRunning();
2.13 }
2.14 }
2.15 - if (old != null) {
2.16 - old.stopOldProcessIfRunning();
2.17 - }
2.18 File f = FileUtil.toFile(file);
2.19 String executable = getNodeExecutable(true);
2.20 if (executable == null) {
2.21 @@ -238,6 +233,8 @@
2.22 p.destroy();
2.23 try {
2.24 p.waitFor();
2.25 + //Give the OS a chance to release the socket
2.26 + Thread.sleep(300);
2.27 } catch (InterruptedException ex) {
2.28 Exceptions.printStackTrace(ex);
2.29 }