]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Changes to blocking model.
authorBrian Wellington <bwelling@xbill.org>
Fri, 17 Jul 2020 23:37:53 +0000 (16:37 -0700)
committerBrian Wellington <bwelling@xbill.org>
Fri, 17 Jul 2020 23:39:40 +0000 (16:39 -0700)
commit4c0fe5541e36e06fccf1a85028bc289d3070374e
treed101ba84db385c86e16d2e9c26d0454e8bb69911
parentac3f05d0d5b61ba46444cb9e66deb7357ff8522e
Changes to blocking model.

Before this change, the synchronous code would check sockets for
readability or writability before doing nonblocking read or write.
This changes them to attempt the read or write first, and then block
if the operation could not complete.

This also removes the no-longer-needed getpeername() call in tcp(),
which was needed to deal with the case where an unconnected socket was
passed in; waiting for writability would block rather than immediately
return an error.  By attempting the write first, we get the error
immediately.
dns/query.py