提交 f71bc2da 编写于 作者: R robm

8180949: Correctly handle exception in TCPChannel.createConnection

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