# HG changeset patch # User lana # Date 1397089142 25200 # Node ID 02a76805d58d6c4999b2e66f3c9a4769e2cba298 # Parent 70ee91a6c72c66d9bded9965daaa662beb423307# Parent ce3ae619aa25cc4063726af4756c62da2f2b0d2a Merge diff -r 70ee91a6c72c -r 02a76805d58d corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java Wed Apr 09 09:19:52 2014 -0700 +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java Wed Apr 09 17:19:02 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()) {