[ovs-dev] [PATCH] python: Catch setsockopt exceptions for TCP stream.
Ben Pfaff
blp at ovn.org
Thu Dec 20 18:12:26 UTC 2018
On Thu, Dec 20, 2018 at 08:35:57PM +0300, Ilya Maximets wrote:
> 'sock.setsockopt' could throw exceptions. For example, if non-blocking
> connection failed before the call:
>
> Traceback (most recent call last):
> File "../.././test-ovsdb.py", line 896, in <module>
> main(sys.argv)
> File "../.././test-ovsdb.py", line 891, in main
> func(*args)
> File "../.././test-ovsdb.py", line 604, in do_idl
> ovs.stream.Stream.open(r))
> File "/root/git_/ovs/python/ovs/stream.py", line 190, in open
> error, sock = cls._open(suffix, dscp)
> File "/root/git_/ovs/python/ovs/stream.py", line 744, in _open
> sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
> File "/usr/local/lib/python2.7/socket.py", line 228, in meth
> return getattr(self._sock,name)(*args)
> socket.error: [Errno 54] Connection reset by peer
>
> This fixes tests on FreeBSD.
>
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Thanks, applied to master and backported.
More information about the dev
mailing list