jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java
changeset 45336 2be29f802d94
parent 45333 fd3fdfe96bb4
child 47032 98e444a1b204
equal deleted inserted replaced
45335:54c960d82428 45336:2be29f802d94
   294                     }
   294                     }
   295 
   295 
   296                     out.flush();
   296                     out.flush();
   297                 }
   297                 }
   298             } catch (IOException e) {
   298             } catch (IOException e) {
       
   299                 try {
       
   300                     conn.close();
       
   301                 } catch (Exception ex) {}
   299                 if (e instanceof RemoteException) {
   302                 if (e instanceof RemoteException) {
   300                     throw (RemoteException) e;
   303                     throw (RemoteException) e;
   301                 } else {
   304                 } else {
   302                     if (conn != null
       
   303                             && e instanceof java.net.SocketTimeoutException)
       
   304                     {
       
   305                         try {
       
   306                             conn.close();
       
   307                         } catch (Exception ex) {}
       
   308                     }
       
   309                     throw new ConnectIOException(
   305                     throw new ConnectIOException(
   310                         "error during JRMP connection establishment", e);
   306                         "error during JRMP connection establishment", e);
   311                 }
   307                 }
   312             }
   308             }
   313         } else {
   309         } else {