@@ -63,6 +63,8 @@ public AsyncHttpClientHandler(AsyncHttpClientConfig config,//
63
63
@ Override
64
64
public void channelRead (final ChannelHandlerContext ctx , Object msg ) throws Exception {
65
65
66
+ LOGGER .debug ("Channel {} read" , ctx .channel ());
67
+
66
68
Channel channel = ctx .channel ();
67
69
Object attribute = Channels .getAttribute (channel );
68
70
@@ -85,7 +87,7 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce
85
87
86
88
StreamedResponsePublisher publisher = (StreamedResponsePublisher ) attribute ;
87
89
88
- if (msg instanceof HttpContent ) {
90
+ if (msg instanceof HttpContent ) {
89
91
ByteBuf content = ((HttpContent ) msg ).content ();
90
92
// Republish as a HttpResponseBodyPart
91
93
if (content .readableBytes () > 0 ) {
@@ -120,6 +122,8 @@ public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exce
120
122
121
123
public void channelInactive (ChannelHandlerContext ctx ) throws Exception {
122
124
125
+ LOGGER .debug ("Channel {} inactive" , ctx .channel ());
126
+
123
127
if (requestSender .isClosed ())
124
128
return ;
125
129
@@ -158,6 +162,9 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception {
158
162
159
163
@ Override
160
164
public void exceptionCaught (ChannelHandlerContext ctx , Throwable e ) throws Exception {
165
+
166
+ LOGGER .debug ("Channel {} exceptionCaught" , ctx .channel ());
167
+
161
168
Throwable cause = getCause (e .getCause ());
162
169
163
170
if (cause instanceof PrematureChannelClosureException || cause instanceof ClosedChannelException )
@@ -221,11 +228,17 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Excep
221
228
222
229
@ Override
223
230
public void channelActive (ChannelHandlerContext ctx ) throws Exception {
231
+
232
+ LOGGER .debug ("Channel {} channelActive" , ctx .channel ());
233
+
224
234
ctx .read ();
225
235
}
226
236
227
237
@ Override
228
238
public void channelReadComplete (ChannelHandlerContext ctx ) throws Exception {
239
+
240
+ LOGGER .debug ("Channel {} channelReadComplete" , ctx .channel ());
241
+
229
242
if (!isHandledByReactiveStreams (ctx )) {
230
243
ctx .read ();
231
244
} else {
0 commit comments