netty5/transport/src/main/java/io/netty/channel
Frank Barber f4d3f81d6c Prevent channel re-registration from firing channelActive
Motivation:

AbstractUnsafe considers two possibilities during channel registration. First,
the channel may be an outgoing connection, in which case it will be registered
before becoming active. Second, the channel may be an incoming connection in,
which case the channel will already be active when it is registered. To handle
the second case, AbstractUnsafe checks if the channel is active after
registration and calls ChannelPipeline.fireChannelActive() if so.  However, if
an active channel is deregistered and then re-registered this logic causes a
second fireChannelActive() to be invoked. This is unexpected; it is reasonable
for handlers to assume that this method will only be invoked once per channel.

Modifications:

This change introduces a flag into AbstractUnsafe to recognize if this is the
first or a subsequent registration. ChannelPipeline.fireChannelActive() is only
possible for the first registration.

Result:

ChannelPipeline.fireChannelActive() is only called once.
2014-11-30 19:51:30 +01:00
..
embedded [#2771] Correctly handle constructing of EmbeddedChannel 2014-08-15 12:21:37 +02:00
group Updated the ChannelGroup JavaDoc by removing b.releaseExternalResources(); 2014-07-24 10:55:09 +02:00
local [#2589] LocalServerChannel.doClose() throws NPE when localAddress == null 2014-06-20 20:13:23 +02:00
nio Fix an infinite loop when writing a zero-length FileRegion 2014-10-17 16:06:51 +09:00
oio Add AbstractUnsafe.annotateConnectException() 2014-10-14 12:29:08 +09:00
socket Fix the regression caused by f31c630c8c 2014-08-15 09:43:56 -07:00
AbstractChannel.java Prevent channel re-registration from firing channelActive 2014-11-30 19:51:30 +01:00
AbstractChannelHandlerContext.java Optimize DefaultChannelPipeline in terms of memory usage and initialization time 2014-06-10 12:18:38 +02:00
AbstractEventLoop.java Implement EventExecutor.parent() in AbstractEventExecutor 2014-03-24 11:05:51 +09:00
AbstractEventLoopGroup.java Add EventExecutor.children() in favor of iterator() 2014-03-24 12:32:55 +09:00
AbstractServerChannel.java Port ChannelOutboundBuffer and related changes from 4.0 2014-08-05 15:00:45 +02:00
AdaptiveRecvByteBufAllocator.java Fix AdaptiveRecvByteBufAllocator.getSizeTableIndex() 2013-06-25 11:07:15 +09:00
AddressedEnvelope.java Enable a user specify an arbitrary information with ReferenceCounted.touch() 2014-02-13 18:16:25 -08:00
Channel.java Allow to obtain RecvByteBufAllocator.Handle to allow more flexible implementations 2014-08-12 06:53:57 +02:00
ChannelConfig.java Enable AUTO_CLOSE opton by default for backward compatibility / Deprecare AUTO_CLOSE option because it's gone in 5.0. 2013-11-05 17:40:23 +09:00
ChannelDuplexHandler.java More javadoc fixes 2013-07-14 18:04:33 +02:00
ChannelException.java
ChannelFactory.java Name resolver API and DNS-based name resolver 2014-10-16 17:05:20 +09:00
ChannelFlushPromiseNotifier.java ChannelFlushPromiseNotifier should allow long value for pendingDataSize 2014-06-03 17:34:53 +02:00
ChannelFuture.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00
ChannelFutureListener.java Replace TransferFuture(Listener) with (Channel)ProgressiveFuture(Listener) 2013-04-15 15:26:20 +09:00
ChannelHandler.java replaced broken &lt with < and same for gt 2014-11-29 19:33:50 +01:00
ChannelHandlerAdapter.java Refactor FastThreadLocal to simplify TLV management 2014-06-19 21:13:55 +09:00
ChannelHandlerAppender.java Fix most inspector warnings 2014-07-02 19:55:07 +09:00
ChannelHandlerContext.java replaced broken &lt with < and same for gt 2014-11-29 19:33:50 +01:00
ChannelHandlerInvoker.java Synchronized between 4.1 and master again (part 2) 2014-04-25 15:06:26 +09:00
ChannelHandlerInvokerUtil.java Undeprecate deregister() and chanelUnregistered() 2014-04-25 16:40:42 +09:00
ChannelId.java Resurrect Channel.id() with global uniqueness 2014-02-13 15:53:07 -08:00
ChannelInboundHandler.java Undeprecate deregister() and chanelUnregistered() 2014-04-25 16:40:42 +09:00
ChannelInboundHandlerAdapter.java Mark ChannelHandler.exceptionCaught(...) as deprecated in preparation to move to ChannelInboundHandler. Related to [#1808] 2013-09-08 20:11:51 +02:00
ChannelInitializer.java Fix NoSuchElementException raised by ChannelInitializer 2013-12-07 11:04:40 +09:00
ChannelMetadata.java Revamp the core API to reduce memory footprint and consumption 2013-06-10 16:10:39 +09:00
ChannelOption.java Synchronized between 4.1 and master 2014-04-25 00:38:02 +09:00
ChannelOutboundBuffer.java Implement user-defined writability flags 2014-10-25 15:59:13 +09:00
ChannelOutboundHandler.java Undeprecate deregister() and chanelUnregistered() 2014-04-25 16:40:42 +09:00
ChannelOutboundHandlerAdapter.java Allow per-write promises and disallow promises on flush() 2013-07-11 00:49:48 +09:00
ChannelPipeline.java Auto-generate the handler name when null is specified as a name 2014-10-14 12:29:08 +09:00
ChannelPipelineException.java
ChannelProgressiveFuture.java Make EventExecutor.shutdownGracefully() return Future 2013-06-12 08:00:54 +09:00
ChannelProgressiveFutureListener.java Replace TransferFuture(Listener) with (Channel)ProgressiveFuture(Listener) 2013-04-15 15:26:20 +09:00
ChannelProgressivePromise.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00
ChannelPromise.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00
ChannelPromiseAggregator.java Add generic versions of PromiseAggregator and PromiseNotifier. 2014-11-07 09:06:58 +01:00
ChannelPromiseNotifier.java Add generic versions of PromiseAggregator and PromiseNotifier. 2014-11-07 09:06:58 +01:00
CombinedChannelDuplexHandler.java Fix most inspector warnings 2014-07-02 19:55:07 +09:00
CompleteChannelFuture.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00
ConnectTimeoutException.java [#1036] Add special ConnectTimeoutException which is thrown if a connection failed because of a timeout 2013-03-07 20:53:45 +01:00
DefaultAddressedEnvelope.java Enable a user specify an arbitrary information with ReferenceCounted.touch() 2014-02-13 18:16:25 -08:00
DefaultChannelConfig.java Access autoRead via an AtomicIntegerFieldUpdater. 2014-10-13 15:15:58 +02:00
DefaultChannelHandlerContext.java Optimize DefaultChannelPipeline in terms of memory usage and initialization time 2014-06-10 12:18:38 +02:00
DefaultChannelHandlerInvoker.java Improve performance of Recycler 2014-06-24 10:47:38 +02:00
DefaultChannelId.java [#2706] Allow pid up to 4194304 2014-07-28 10:12:49 -07:00
DefaultChannelPipeline.java Small performance improvements 2014-11-20 00:10:06 -05:00
DefaultChannelProgressivePromise.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00
DefaultChannelPromise.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00
DefaultEventLoop.java Replace LocalEventLoopGroup with DefaultEventLoopGroup 2014-03-24 11:39:55 +09:00
DefaultEventLoopGroup.java Replace LocalEventLoopGroup with DefaultEventLoopGroup 2014-03-24 11:39:55 +09:00
DefaultFileRegion.java Enable a user specify an arbitrary information with ReferenceCounted.touch() 2014-02-13 18:16:25 -08:00
DefaultMessageSizeEstimator.java Correctly update Channel.isWritable() when the write happens from outside the EventLoop in a fast fashion. Fixes [#1697] 2013-08-07 10:10:43 +02:00
EventLoop.java User-definable thread model via ChannelHandlerInvoker 2014-03-24 18:09:27 +09:00
EventLoopException.java Fix types in javadocs 2013-07-22 19:14:36 +02:00
EventLoopGroup.java Allow to get an Iterator over all of the EventExecutor an EventExecutorGroup contains. Beside this allow to get basic stats for the EventExecutor like pendingTasks and executorCount 2013-04-09 15:45:18 +09:00
FailedChannelFuture.java Fix most inspector warnings 2014-07-02 19:55:07 +09:00
FileRegion.java Enable a user specify an arbitrary information with ReferenceCounted.touch() 2014-02-13 18:16:25 -08:00
FixedRecvByteBufAllocator.java Revamp the core API to reduce memory footprint and consumption 2013-06-10 16:10:39 +09:00
MessageSizeEstimator.java Correctly update Channel.isWritable() when the write happens from outside the EventLoop in a fast fashion. Fixes [#1697] 2013-08-07 10:10:43 +02:00
MultithreadEventLoopGroup.java Correct the return type of MultithreadEventLoopGroup.newChild() 2014-03-24 17:05:36 +09:00
package-info.java
PendingWriteQueue.java [#2752] Add PendingWriteQueue for queue up writes 2014-08-12 06:38:22 +02:00
RecvByteBufAllocator.java More javadoc fixes 2013-06-13 20:56:17 +02:00
ReflectiveChannelFactory.java Name resolver API and DNS-based name resolver 2014-10-16 17:05:20 +09:00
ServerChannel.java
SimpleChannelInboundHandler.java Small improvement in SimpleChannelInboundHandlerAdapter javadoc 2014-06-18 14:49:36 +02:00
SingleThreadEventLoop.java User-definable thread model via ChannelHandlerInvoker 2014-03-24 18:09:27 +09:00
SucceededChannelFuture.java Fix most inspector warnings 2014-07-02 19:55:07 +09:00
ThreadLocalPooledDirectByteBuf.java Fix most inspector warnings 2014-07-02 19:55:07 +09:00
ThreadPerChannelEventLoop.java Fix most inspector warnings 2014-07-02 19:55:07 +09:00
ThreadPerChannelEventLoopGroup.java Add EventExecutor.children() in favor of iterator() 2014-03-24 12:32:55 +09:00
VoidChannelPromise.java [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid() 2014-07-03 14:17:12 +02:00