*/
private void resetKeepalive() {
LOG.trace("{}: Resetting netconf keepalive timer", id);
- currentKeepalive.cancel(false);
+ if(currentKeepalive != null) {
+ currentKeepalive.cancel(false);
+ }
scheduleKeepalive();
}
* Cancel current keepalive and also reset current deviceRpc
*/
private void stopKeepalives() {
- currentKeepalive.cancel(false);
+ if(currentKeepalive != null) {
+ currentKeepalive.cancel(false);
+ }
currentDeviceRpc = null;
}