提交 f71bc2da 编写于 作者: R robm

8180949: Correctly handle exception in TCPChannel.createConnection

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