提交 d510547d 编写于 作者: A aefimov

8029073: (corba) New connection reclaimed when number of connection is greater than highwatermark

Reviewed-by: coffeys
上级 396b3377
......@@ -253,6 +253,13 @@ public class SocketOrChannelAcceptorImpl
// 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()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册