@@ -323,18 +323,9 @@ public <T> void writeRequest(NettyResponseFuture<T> future, Channel channel) {
323
323
if (handler instanceof TransferCompletionHandler )
324
324
configureTransferAdapter (handler , httpRequest );
325
325
326
- if (!future .isHeadersAlreadyWrittenOnContinue ()) {
327
- try {
328
- if (future .getAsyncHandler () instanceof AsyncHandlerExtensions )
329
- AsyncHandlerExtensions .class .cast (future .getAsyncHandler ()).onSendRequest (nettyRequest );
330
- channel .write (httpRequest ).addListener (new ProgressListener (config , future .getAsyncHandler (), future , true ));
331
- } catch (Throwable cause ) {
332
- // FIXME why not notify?
333
- LOGGER .debug (cause .getMessage (), cause );
334
- // FIXME what about the attribute? how could this fail?
335
- Channels .silentlyCloseChannel (channel );
336
- return ;
337
- }
326
+ if (!future .isHeadersAlreadyWrittenOnContinue () &&future .getAsyncHandler () instanceof AsyncHandlerExtensions ) {
327
+ AsyncHandlerExtensions .class .cast (future .getAsyncHandler ()).onSendRequest (nettyRequest );
328
+ channel .write (httpRequest ).addListener (new ProgressListener (config , future .getAsyncHandler (), future , true ));
338
329
}
339
330
340
331
// FIXME what happens to this second write if the first one failed? Should it be done in the ProgressListener?
@@ -346,7 +337,8 @@ public <T> void writeRequest(NettyResponseFuture<T> future, Channel channel) {
346
337
if (Channels .isChannelValid (channel ))
347
338
scheduleTimeouts (future );
348
339
349
- } catch (Throwable ioe ) {
340
+ } catch (Throwable t ) {
341
+ LOGGER .error ("Can't write request" , t );
350
342
Channels .silentlyCloseChannel (channel );
351
343
}
352
344
}
0 commit comments