# HG changeset patch # User lana # Date 1397234213 25200 # Node ID ff602d7942591d671b20021f0b0b3fe1acf8cb5d # Parent 217b7b57882954e4f79d37b8bb22331420606f70# Parent 693525eeea859e20a9d22405d375161750082ad2 Merge diff -r 217b7b578829 -r ff602d794259 src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java --- a/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java Wed Apr 09 08:47:28 2014 -0700 +++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java Fri Apr 11 09:36:53 2014 -0700 @@ -253,6 +253,13 @@ // registered with the selector. Otherwise if the bytes // are read on the connection it will attempt a time stamp // but the cache will be null, resulting in NPE. + + // A connection needs to be timestamped before putting to the cache. + // Otherwise the newly created connection (with 0 timestamp) could be + // incorrectly reclaimed by concurrent reclaim() call OR if there + // will be no events on this connection then it could be reclaimed + // by upcoming reclaim() call. + getConnectionCache().stampTime(connection); getConnectionCache().put(this, connection); if (connection.shouldRegisterServerReadEvent()) {