提交 08d211bc 编写于 作者: K kohsuke

added error diagnostics to find out where the connection is closed.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5434 71c3de6d-444a-0410-be80-ed276b4c234a
上级 46624e3c
......@@ -370,7 +370,7 @@ public class Channel implements VirtualChannel {
protected void execute(Channel channel) {
try {
channel.close();
channel.terminate(null);
channel.terminate(new OrderlyShutdown(createdAt));
} catch (IOException e) {
logger.log(Level.SEVERE,"close command failed on "+channel.name,e);
logger.log(Level.INFO,"close command created at",createdAt);
......@@ -382,6 +382,18 @@ public class Channel implements VirtualChannel {
}
}
/**
* Signals the orderly shutdown of the channel, but captures
* where the termination was initiated as a nested exception.
*/
private static final class OrderlyShutdown extends IOException {
private OrderlyShutdown(Throwable cause) {
super(cause.getMessage());
initCause(cause);
}
private static final long serialVersionUID = 1L;
}
/**
* {@inheritDoc}
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册