void finishConnection ( ) { NioSocketConnector conn = this . connector ; if ( conn != null ) { this . connector = null ; conn . dispose ( ) ; for ( ConnectionListener listener : this . connectionListeners ) { listener . connectionEnded ( this ) ; } } ExecutorFilter execs = this . executors ; if ( execs != null ) { this . executors = null ; execs . destroy ( ) ; } }
Cleans - up any resources after a connection has terminated . Should be called when the connection is disconnected and reconnect is not desired .