bgp: catch socket error with sendall
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
f513b8751d
commit
ba9621627d
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user