提交 105bbc88 编写于 作者: J Jesse Glick

Indicate the actual protocol being served.

上级 0993b709
......@@ -201,8 +201,6 @@ public final class TcpSlaveAgentListener extends Thread {
@Override
public void run() {
try {
LOGGER.log(Level.INFO, "Accepted connection #{0} from {1}", new Object[]{id,s.getRemoteSocketAddress()});
DataInputStream in = new DataInputStream(s.getInputStream());
PrintWriter out = new PrintWriter(
new BufferedWriter(new OutputStreamWriter(s.getOutputStream(),"UTF-8")),
......@@ -227,6 +225,7 @@ public final class TcpSlaveAgentListener extends Thread {
AgentProtocol p = AgentProtocol.of(protocol);
if (p!=null) {
if (Jenkins.getInstance().getAgentProtocols().contains(protocol)) {
LOGGER.log(Level.INFO, "Accepted {0} connection #{1} from {2}", new Object[] {protocol, id, this.s.getRemoteSocketAddress()});
p.handle(this.s);
} else {
error(out, "Disabled protocol:" + s);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册