self._localname() is invalid before a connection establishes.
Signed-off-by: FUJITA Tomonori <[email protected]>
---
ryu/services/protocols/bgp/speaker.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ryu/services/protocols/bgp/speaker.py
b/ryu/services/protocols/bgp/speaker.py
index f276b83..fc7ae9d 100644
--- a/ryu/services/protocols/bgp/speaker.py
+++ b/ryu/services/protocols/bgp/speaker.py
@@ -362,8 +362,9 @@ class BgpProtocol(Protocol, Activity):
reason = notification.reason
self._send_with_lock(notification)
self._signal_bus.bgp_error(self._peer, code, subcode, reason)
- LOG.error('Sent notification to %r >> %s' % (self._localname(),
- notification))
+ if len(self._localname()):
+ LOG.error('Sent notification to %r >> %s' % (self._localname(),
+ notification))
self._socket.close()
def _send_with_lock(self, msg):
--
1.8.5.2 (Apple Git-48)
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel