From 59f9b2fcfeade64a99963d8dcafbe4b9631da826 Mon Sep 17 00:00:00 2001 From: stephenconnolly Date: Fri, 25 May 2007 11:17:14 +0000 Subject: [PATCH] Don't print error messages when they are not needed! git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3347 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/TcpSlaveAgentListener.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/hudson/TcpSlaveAgentListener.java b/core/src/main/java/hudson/TcpSlaveAgentListener.java index 648e334bef..f5d28db6ff 100644 --- a/core/src/main/java/hudson/TcpSlaveAgentListener.java +++ b/core/src/main/java/hudson/TcpSlaveAgentListener.java @@ -104,7 +104,7 @@ public class TcpSlaveAgentListener extends Thread { } /** - * Initiates the shuts down of the listener. + * Initiates the shuts down of the listener. */ public void shutdown() { shuttingDown = true; @@ -140,11 +140,14 @@ public class TcpSlaveAgentListener extends Thread { if(s.startsWith("Protocol:")) { String protocol = s.substring(9); - if(protocol.equals("JNLP-connect")) + if(protocol.equals("JNLP-connect")) { runJnlpConnect(in, out); + } else { + error(out, "Unknown protocol:" + s); + } + } else { + error(out, "Unrecognized protocol: "+s); } - - error(out, "Unrecognized protocol: "+s); } catch (InterruptedException e) { LOGGER.log(Level.WARNING,"Connection #"+id+" aborted",e); try {