From 6a98e38c24ab7faa051f34b97f5117613a9ef276 Mon Sep 17 00:00:00 2001 From: Violeta Georgieva Date: Fri, 26 Jul 2019 16:16:06 +0300 Subject: [PATCH] fix #783 If a handler is added with Connection#addHandler*, events prior channel active state are not available --- src/main/java/reactor/netty/Connection.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/reactor/netty/Connection.java b/src/main/java/reactor/netty/Connection.java index f87d2bb4ed..4a7e0d497a 100644 --- a/src/main/java/reactor/netty/Connection.java +++ b/src/main/java/reactor/netty/Connection.java @@ -74,6 +74,8 @@ default T as(Class clazz) { *

* If effectively added, the handler will be safely removed when the channel is made * inactive (pool release). + * As the Connection object is available once the channel is in active state, events prior this state + * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.) * * @param handler handler instance * @@ -94,6 +96,8 @@ default Connection addHandler(ChannelHandler handler){ *

* If effectively added, the handler will be safely removed when the channel is made * inactive (pool release). + * As the Connection object is available once the channel is in active state, events prior this state + * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.) * * @param name handler name * @param handler handler instance @@ -119,6 +123,8 @@ default Connection addHandler(String name, ChannelHandler handler){ *

* If effectively added, the handler will be safely removed when the channel is made * inactive (pool release). + * As the Connection object is available once the channel is in active state, events prior this state + * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.) * * @param handler handler instance * @@ -138,6 +144,8 @@ default Connection addHandlerLast(ChannelHandler handler){ *

* If effectively added, the handler will be safely removed when the channel is made * inactive (pool release). + * As the Connection object is available once the channel is in active state, events prior this state + * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.) * * @param name handler name * @param handler handler instance @@ -158,6 +166,8 @@ default Connection addHandlerLast(String name, ChannelHandler handler){ *

* If effectively added, the handler will be safely removed when the channel is made * inactive (pool release). + * As the Connection object is available once the channel is in active state, events prior this state + * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.) * * @param handler handler instance * @@ -176,6 +186,8 @@ default Connection addHandlerFirst(ChannelHandler handler){ *

* If effectively added, the handler will be safely removed when the channel is made * inactive (pool release). + * As the Connection object is available once the channel is in active state, events prior this state + * will not be available (i.e. {@code channelRegistered}, {@code initChannel}, {@code channelActive}, etc.) * * @param name handler name * @param handler handler instance