RROR 2014-04-23 11:54:59,239 hub 58 hub: uncaught exception: Traceback (most 
recent c\
all last):
  File "/Users/fujita/git/ryu/ryu/lib/hub.py", line 50, in _launch
    func(*args, **kwargs)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/base.py", line 239, in 
start
    self._run(*args, **kwargs)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/peer.py", line 448, in 
_run
    self._connect_loop(client_factory)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/peer.py", line 820, in 
_conne\
ct_loop
    bind_address=bind_addr)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/base.py", line 354, in 
_conne\
ct_tcp
    return sock
UnboundLocalError: local variable 'sock' referenced before assignment

Signed-off-by: FUJITA Tomonori <[email protected]>
---
 ryu/services/protocols/bgp/base.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ryu/services/protocols/bgp/base.py 
b/ryu/services/protocols/bgp/base.py
index 571826f..9eff703 100644
--- a/ryu/services/protocols/bgp/base.py
+++ b/ryu/services/protocols/bgp/base.py
@@ -17,6 +17,7 @@
 """
 import abc
 import logging
+import socket
 import time
 import traceback
 import weakref
@@ -340,7 +341,7 @@ class Activity(object):
         """
         LOG.debug('Connect TCP called for %s:%s' % (peer_addr[0],
                                                     peer_addr[1]))
-        with Timeout(time_out, False):
+        with Timeout(time_out, socket.error):
             sock = hub.connect(peer_addr, bind=bind_address)
             if sock:
                 # Connection name for pro-active connection is made up
-- 
1.8.5.2 (Apple Git-48)


------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to