src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java

changeset 645
693525eeea85
parent 478
80161c61aa68
child 748
6845b95cba6b
child 1205
803798e13dd5
     1.1 --- a/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Wed Mar 26 12:00:38 2014 -0700
     1.2 +++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java	Fri Apr 04 14:58:04 2014 +0400
     1.3 @@ -253,6 +253,13 @@
     1.4              // registered with the selector.  Otherwise if the bytes
     1.5              // are read on the connection it will attempt a time stamp
     1.6              // but the cache will be null, resulting in NPE.
     1.7 +
     1.8 +            // A connection needs to be timestamped before putting to the cache.
     1.9 +            // Otherwise the newly created connection (with 0 timestamp) could be
    1.10 +            // incorrectly reclaimed by concurrent reclaim() call OR if there
    1.11 +            // will be no events on this connection then it could be reclaimed
    1.12 +            // by upcoming reclaim() call.
    1.13 +            getConnectionCache().stampTime(connection);
    1.14              getConnectionCache().put(this, connection);
    1.15  
    1.16              if (connection.shouldRegisterServerReadEvent()) {

mercurial