提交 cf3aa1d9 编写于 作者: H huybrechts

[FIXED HUDSON-3018] close slave log

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15920 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a449d2a7
......@@ -197,12 +197,17 @@ public final class TcpSlaveAgentListener extends Thread {
out.println("Welcome");
OutputStream log = computer.openLogFile();
final OutputStream log = computer.openLogFile();
new PrintWriter(log).println("JNLP agent connected from "+ this.s.getInetAddress());
computer.setChannel(new BufferedInputStream(this.s.getInputStream()), new BufferedOutputStream(this.s.getOutputStream()), log,
new Listener() {
public void onClosed(Channel channel, IOException cause) {
try {
log.close();
} catch (IOException e) {
e.printStackTrace();
}
if(cause!=null)
LOGGER.log(Level.WARNING, "Connection #"+id+" terminated",cause);
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册