]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Improve TCP connect behavior. 389/head
authorBrian Wellington <bwelling@xbill.org>
Fri, 30 Aug 2019 18:42:12 +0000 (11:42 -0700)
committerBrian Wellington <bwelling@xbill.org>
Fri, 30 Aug 2019 18:42:12 +0000 (11:42 -0700)
commitd1d57c87904a0d69a93180054abad52f0b9dca0f
tree4d2ec5c23dcb703f19a92016d3e18b6829482a89
parent676a8ed33896edb1e1526c3128d11faa03140471
Improve TCP connect behavior.

Before this change, the _connect() method would start the connection
process, but not wait for it to complete.  This would leave the socket
in an indeterminate state until some other code checked for writability,
and would lose the error code if the connect failed.

This changes _connect() to wait for the connection to complete, and
raises and exception with the appropriate error code if it fails.
dns/query.py