OpenJDK / jdk9 / jdk9 / corba
changeset 580:dd71ed699a42
8029073: (corba) New connection reclaimed when number of connection is greater than highwatermark
Reviewed-by: coffeys
author | aefimov |
---|---|
date | Fri, 04 Apr 2014 14:58:04 +0400 |
parents | 7c70b7ef7ab9 |
children | 2da7fead826b |
files | src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java |
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 02 21:45:26 2014 +0100 +++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelAcceptorImpl.java Fri Apr 04 14:58:04 2014 +0400 @@ -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()) {