Change-Id: I4d843960c68b5258a8e41eaf52efb7520ae6b8d9
Signed-off-by: Robert Varga <rovarga@cisco.com>
if (ct >= nextKeepalive) {
this.sendMessage(new PCEPKeepAliveMessage());
nextKeepalive = (long) (this.lastMessageSentAt + getKeepAliveTimerValue() * 1E9);
if (ct >= nextKeepalive) {
this.sendMessage(new PCEPKeepAliveMessage());
nextKeepalive = (long) (this.lastMessageSentAt + getKeepAliveTimerValue() * 1E9);
- } else {
- this.stateTimer.newTimeout(new TimerTask() {
- @Override
- public void run(final Timeout timeout) throws Exception {
- handleKeepaliveTimer();
- }
- }, nextKeepalive - ct, TimeUnit.NANOSECONDS);
+
+ this.stateTimer.newTimeout(new TimerTask() {
+ @Override
+ public void run(final Timeout timeout) throws Exception {
+ handleKeepaliveTimer();
+ }
+ }, nextKeepalive - ct, TimeUnit.NANOSECONDS);