changeset 23757:02a76805d58d

Merge
author lana
date Wed, 09 Apr 2014 17:19:02 -0700
parents 70ee91a6c72c ce3ae619aa25
children 8194e17854ea
files
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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()) {