On Sun, Jul 08, 2018 at 10:05:41PM +0530, [email protected] wrote: > From: Numan Siddique <[email protected]> > > Calling ovs.stream.open_block(ovs.stream.open("tcp:127.0.0.1:6641")) returns > success even if there is no server listening on 6641. To check if the > connection > is established or not, Stream class makes use of > ovs.socket_util.check_connection_completion(). > This function returns zero if the select for the socket fd signals. It doesn't > really check if the connection was established or not. > > This patch fixes this issue by adding a wrapper function - > check_connection_completion_status() > which calls sock.connect_ex() to get the status of the connection if > ovs.socket_util.check_connection_completion() returns success. > > The test cases added fails without the fix in this patch. > > Signed-off-by: Numan Siddique <[email protected]>
I don't understand the problem here. I mean, I believe when you say there is a problem, but the cause doesn't really make sense to me. The code for check_connection_completion in socket_util.py looks correct to me and equivalent to the C implementation in socket-util.c. Do you have an idea of why it doesn't work properly? (Is it somehow specific to Python?) I don't think we have an equivalent test for the C version. Does it pass, or does it need a similar change? Thanks, Ben. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
