Bug-6468: Duplicate cleanup and connected-peer-counter decrement during BGP session... 36/45036/1
authorAjay <ajayl.bro@gmail.com>
Mon, 29 Aug 2016 20:56:34 +0000 (20:56 +0000)
committerMilos Fabian <milfabia@cisco.com>
Thu, 1 Sep 2016 20:23:20 +0000 (20:23 +0000)
commitb5ec42e035fbe1e85dbaa565ff09ae057eb78644
treed6c617e558464094e65807c81e14374adc1d3a86
parentf77bfa30308d49e6ced726816713b6f4aa5f341c
Bug-6468: Duplicate cleanup and connected-peer-counter decrement during BGP session cleanup
1. Add synchronized to BGPPeer#releaseConnection to avoid race condition
2. Add check to BGPSessionImpl#closeWithoutMessage so that it's body does not
   get executed twice, even if it does get called twice during session cleanup

Change-Id: I78d89de2c9c0fa8968bbb6a019d568a539a8c5f7
Signed-off-by: Ajay <ajayl.bro@gmail.com>
(cherry picked from commit 78b58179e6ef65fae98b134112e7aa0bbe7e1a91)
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPSessionImpl.java