static void closeOnFlush ( Channel ch ) { if ( ch . isConnected ( ) ) { ch . write ( ChannelBuffers . EMPTY_BUFFER ) . addListener ( ChannelFutureListener . CLOSE ) ; } }
Closes the specified channel after all queued write requests are flushed .