< prev index next >

src/java.base/unix/classes/sun/nio/ch/InheritedChannel.java

Print this page

        

*** 179,200 **** SelectorProvider provider = SelectorProvider.provider(); assert provider instanceof sun.nio.ch.SelectorProviderImpl; Channel c; ! if (st == SOCK_STREAM) { ! InetAddress ia = peerAddress0(fdVal); ! if (ia == null) { ! c = new InheritedServerSocketChannelImpl(provider, fd); } else { ! int port = peerPort0(fdVal); ! assert port > 0; ! InetSocketAddress isa = new InetSocketAddress(ia, port); ! c = new InheritedSocketChannelImpl(provider, fd, isa); } ! } else { ! c = new InheritedDatagramChannelImpl(provider, fd); } return c; } private static boolean haveChannel = false; --- 179,205 ---- SelectorProvider provider = SelectorProvider.provider(); assert provider instanceof sun.nio.ch.SelectorProviderImpl; Channel c; ! try { ! if (st == SOCK_STREAM) { ! InetAddress ia = peerAddress0(fdVal); ! if (ia == null) { ! c = new InheritedServerSocketChannelImpl(provider, fd); ! } else { ! int port = peerPort0(fdVal); ! assert port > 0; ! InetSocketAddress isa = new InetSocketAddress(ia, port); ! c = new InheritedSocketChannelImpl(provider, fd, isa); ! } } else { ! c = new InheritedDatagramChannelImpl(provider, fd); } ! } catch (Exception e) { ! close0(fdVal); ! throw e; } return c; } private static boolean haveChannel = false;
< prev index next >