public abstract class AbstractNetconfSessionNegotiator<P extends NetconfSessionPreferences, S extends NetconfSession>
extends AbstractSessionNegotiator<NetconfMessage, S> {
- // TODO what time ?
+ // TODO Adjust wait time for negotiation, now is 1 minute ?
private static final long INITIAL_HOLDTIMER = 1;
private static final Logger logger = LoggerFactory.getLogger(AbstractNetconfSessionNegotiator.class);
"Session was not established after " + timeout);
negotiationFailed(cause);
changeState(State.FAILED);
- } else
+ } else if(channel.isOpen()) {
channel.pipeline().remove(NAME_OF_EXCEPTION_HANDLER);
+ }
}
}
}, INITIAL_HOLDTIMER, TimeUnit.MINUTES);