needs to use the same listener or else the later will clover the former log.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9498 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-05-21 16:20:09 +00:00
1 parent 0b2c506dbd
commit 739b625f26
1 file changed
+3 -2
@@ -191,9 +191,10 @@ public final class SlaveComputer extends Computer {
public void run() {
// do this on another thread so that any lengthy disconnect operation
// (which could be typical) won't block UI thread.
launcher.beforeDisconnect(SlaveComputer.this, new StreamTaskListener(openLogFile()));
StreamTaskListener listener = new StreamTaskListener(openLogFile());
launcher.beforeDisconnect(SlaveComputer.this, listener);
closeChannel();
launcher.afterDisconnect(SlaveComputer.this, new StreamTaskListener(openLogFile()));
launcher.afterDisconnect(SlaveComputer.this, listener);
}
});
}