diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-15 21:22:36 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-06-16 08:11:41 +0900 |
commit | ba9621627de2691eeb6edae486c25c2f0b635f39 (patch) | |
tree | fa1135c2f7fc1fe38e8b13c7ff3aa81edd7458f7 | |
parent | f513b8751ddde0274203b589057da40e82ac9275 (diff) |
bgp: catch socket error with sendall
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/speaker.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ryu/services/protocols/bgp/speaker.py b/ryu/services/protocols/bgp/speaker.py index e4a9bc92..7b98aa2f 100644 --- a/ryu/services/protocols/bgp/speaker.py +++ b/ryu/services/protocols/bgp/speaker.py @@ -376,6 +376,8 @@ class BgpProtocol(Protocol, Activity): self._sendlock.acquire() try: self._socket.sendall(msg.serialize()) + except socket.error as err: + self.connection_lost('failed to write to socket') finally: self._sendlock.release() |