void handleClosed ( ) { if ( ! closed ) { closed = true ; for ( ContextualFuture < ? > responseFuture : responseFutures . values ( ) ) { responseFuture . context . executor ( ) . execute ( ( ) -> responseFuture . completeExceptionally ( new ConnectException ( "connection closed" ) ) ) ; } responseFutures . clear ( ) ; for ( Listener < Connection > listener : closeListeners ) { listener . accept ( this ) ; } timeout . cancel ( ) ; } }
Handles the channel being closed .