X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=bgp%2Frib-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fbgp%2Frib%2Fimpl%2FApplicationPeer.java;h=c480eda500dee8add4cfb65cb74f066c7792de4d;hb=bc74c442eb4f700fada20d3611027719febcc5ae;hp=bb6b4905b5c0b25bfb3084fc5762268b6bbbf181;hpb=89ab65719fdcca5827997a4f4f0586674de43e5f;p=bgpcep.git diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ApplicationPeer.java b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ApplicationPeer.java index bb6b4905b5..c480eda500 100644 --- a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ApplicationPeer.java +++ b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/ApplicationPeer.java @@ -42,6 +42,7 @@ public class ApplicationPeer implements AutoCloseable, org.opendaylight.protocol private final String name; private final YangInstanceIdentifier adjRibsInId; private final DOMTransactionChain chain; + private final DOMTransactionChain writerChain; private AdjRibInWriter writer; @@ -52,7 +53,8 @@ public class ApplicationPeer implements AutoCloseable, org.opendaylight.protocol final NodeIdentifierWithPredicates peerId = IdentifierUtils.domPeerId(RouterIds.createPeerId(ipAddress)); this.adjRibsInId = this.targetRib.getYangRibId().node(Peer.QNAME).node(peerId).node(AdjRibIn.QNAME).node(Tables.QNAME); this.chain = this.targetRib.createPeerChain(this); - this.writer = AdjRibInWriter.create(this.targetRib.getYangRibId(), PeerRole.Ibgp, this.targetRib.createPeerChain(this)); + this.writerChain = this.targetRib.createPeerChain(this); + this.writer = AdjRibInWriter.create(this.targetRib.getYangRibId(), PeerRole.Ibgp, this.writerChain); // FIXME: set to true, once it's fixed how to skip advertising routes back to AppPeer this.writer = this.writer.transform(RouterIds.createPeerId(ipAddress), this.targetRib.getRibSupportContext(), this.targetRib.getLocalTablesKeys(), false); } @@ -87,6 +89,7 @@ public class ApplicationPeer implements AutoCloseable, org.opendaylight.protocol public void close() { this.writer.cleanTables(this.targetRib.getLocalTablesKeys()); this.chain.close(); + this.writerChain.close(); } @Override