提交 60dcc4fd 编写于 作者: R robm

8175131: sun.rmi.transport.tcp.TCPChannel.createConnection close connection on timeout

Reviewed-by: rriggs, msheppar
上级 ca24976a
...@@ -298,12 +298,20 @@ public class TCPChannel implements Channel { ...@@ -298,12 +298,20 @@ public class TCPChannel implements Channel {
out.flush(); out.flush();
} }
} catch (IOException e) { } catch (IOException e) {
if (e instanceof RemoteException) if (e instanceof RemoteException) {
throw (RemoteException) e; throw (RemoteException) e;
else } else {
if (conn != null
&& e instanceof java.net.SocketTimeoutException)
{
try {
conn.close();
} catch (Exception ex) {}
}
throw new ConnectIOException( throw new ConnectIOException(
"error during JRMP connection establishment", e); "error during JRMP connection establishment", e);
} }
}
} else { } else {
try { try {
conn = multiplexer.openConnection(); conn = multiplexer.openConnection();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册