File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
src/main/java/com/ning/http/client/providers/netty/channel Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -317,17 +317,15 @@ public void close() {
317
317
public void closeChannel (Channel channel ) {
318
318
319
319
// The channel may have already been removed from the future if a timeout occurred, and this method may be called just after.
320
- if (channel != null ) {
321
- LOGGER .debug ("Closing Channel {} " , channel );
322
- try {
323
- removeAll (channel );
324
- Channels .setDiscard (channel );
325
- channel .close ();
326
- } catch (Throwable t ) {
327
- LOGGER .debug ("Error closing a connection" , t );
328
- }
329
- openChannels .remove (channel );
320
+ LOGGER .debug ("Closing Channel {} " , channel );
321
+ try {
322
+ removeAll (channel );
323
+ Channels .setDiscard (channel );
324
+ channel .close ();
325
+ } catch (Throwable t ) {
326
+ LOGGER .debug ("Error closing a connection" , t );
330
327
}
328
+ openChannels .remove (channel );
331
329
}
332
330
333
331
public void abortChannelPreemption (String poolKey ) {
You can’t perform that action at this time.
0 commit comments