changeset 695:9a6092124c7c jdk8u20-b11

Merge
author lana
date Wed, 16 Apr 2014 15:06:41 -0700
parents 1154d35e808d (current diff) ff602d794259 (diff)
children 673829390271 d88cf94e5723
files
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Wed Apr 16 12:32:16 2014 -0700
+++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Wed Apr 16 15:06:41 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()) {