BUG-2109 : clear BGP session after it was already initialized
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / BGPPeer.java
index a605c773eb8e7682548422b08167d68b6fc07e36..ca07ea75f60271918e9017946542d6ffe00b90ff 100644 (file)
@@ -171,6 +171,11 @@ public class BGPPeer implements ReusableBGPPeer, Peer, AutoCloseable, BGPPeerRun
         }
     }
 
+    @Override
+    public boolean isSessionActive() {
+        return this.session != null;
+    }
+
     @Override
     public synchronized byte[] getRawIdentifier() {
         return Arrays.copyOf(this.rawIdentifier, this.rawIdentifier.length);