mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-25 13:04:05 +00:00
8180949: Correctly handle exception in TCPChannel.createConnection
Reviewed-by: rriggs
This commit is contained in:
parent
74ef00df37
commit
e830b7d68e
@ -296,16 +296,12 @@ public class TCPChannel implements Channel {
|
||||
out.flush();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
try {
|
||||
conn.close();
|
||||
} catch (Exception ex) {}
|
||||
if (e instanceof RemoteException) {
|
||||
throw (RemoteException) e;
|
||||
} else {
|
||||
if (conn != null
|
||||
&& e instanceof java.net.SocketTimeoutException)
|
||||
{
|
||||
try {
|
||||
conn.close();
|
||||
} catch (Exception ex) {}
|
||||
}
|
||||
throw new ConnectIOException(
|
||||
"error during JRMP connection establishment", e);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user