From bcdff8c55b9f413202e06aba73bc2dd8dc7e3edd Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Wed, 24 Aug 2011 09:24:28 -0700 Subject: [PATCH] if launcher fails to connect silently, report an error --- core/src/main/java/hudson/slaves/SlaveComputer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/slaves/SlaveComputer.java b/core/src/main/java/hudson/slaves/SlaveComputer.java index cbafd9c0f9..f0de611c7c 100644 --- a/core/src/main/java/hudson/slaves/SlaveComputer.java +++ b/core/src/main/java/hudson/slaves/SlaveComputer.java @@ -192,7 +192,6 @@ public class SlaveComputer extends Computer { log.rewind(); try { launcher.launch(SlaveComputer.this, taskListener); - return null; } catch (AbortException e) { taskListener.error(e.getMessage()); throw e; @@ -208,6 +207,10 @@ public class SlaveComputer extends Computer { if (channel==null) offlineCause = new OfflineCause.LaunchFailed(); } + + if (channel==null) + throw new IOException("Slave failed to connect, even though the launcher didn't report it. See the log output for details."); + return null; } }); } -- GitLab