| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
If we do not set a timeout on the SSL handshake, this can cause an infinite
hang if something happens during this point to the remote end - this
has been seen with AWS MQ RabbitMQ during cluster maintenance triggering
a reboot, and causing hangs of any connection that is in the handshake
phase.
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use AF_UNSPEC for name resolution
This reverts most of 1ad97fb14c0c3c57395ca525932f95a830e51a88, but
keeps tests which still have general applicability.
The reason the original change was made was to try and work around a
bug[1] in the eventlet library. Eventlet monkey-patches the
socket.getaddrinfo function and replaces it with its own async,
eventlet-aware implementation. The reason name resolution was broken
in the first place is because eventlet was consulting DNS first, and
then if that failed, falling back to /etc/hosts, which is just flat
out incorrect behavior.
It's important to note that this was *only* when running py-amqp under
eventlet, and *only* for specific versions of eventlet that have long
been fixed. So this workaround is not even needed anymore.
With "normal" (non-eventlet) use, socket.getaddrinfo instead calls
into the glibc getaddrinfo implementation, which ultimately uses
libnss to resolve hostnames.
However, there is an issue with the original workaround when using the
default (glibc) getaddrinfo. The workaround (current) implementation
explicitly forces resolution to use AF_INET (IPv4) and then only if
that does not succeed, it in turn will try with AF_INET6 (IPv6). This
generally works well for IPv4-only hosts, but can be unnecessarily
slow for dual-stack IPv4/IPv6 hosts.
Consider the following:
- We want to connect to example.org
- The /etc/hosts file contains an IPv6 entry:
example.org f00d::1
- The /etc/nsswitch.conf file contains typical (simplified) hosts
config:
hosts: files dns
In this case, the current code will involve nss iterating through the
modules:
- files (with AF_INET): fails, because there is no IPv4 address in
/etc/hosts
- dns (with AF_INET): may or may not succeed per-site, depending on
how DNS is configured. If DNS is slow/misconfigured, this may incur
a delay and block for a significant amount of time.
- files (with AF_INET6): succeeds, and getaddrinfo returns f00d::1.
Now in the same scenario as before, with this fix which reverts back
to using AF_UNSPEC instead:
- files (with AF_UNSPEC) succeeds, and getaddrinfo returns f00d::1.
There is no need to involve DNS at all. Even a well-configured,
quick-to-respond DNS server is going to be many orders of magnitude
slower than consulting with /etc/hosts which libnss keeps cached in
memory.
[1] https://bugs.launchpad.net/neutron/+bug/1696094/comments/22
* tests: ensure getaddrinfo is called with AF_UNSPEC
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* adding experimental __slots__ to some classes
* adding more experimental __slots__ to some classes
* remove redundant slots
* added more experimental slots to classes
* remove slots from buffer class
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* start dropping python 3.6
mainly for 5.1.0 release
* update tidelift alignment config CI (#375)
* update tidelift alignment config CI
* update tidelift CLI properly
* not needed on PR
* drop python from all matrix
|
|
|
|
|
|
|
| |
* update tidelift alignment config CI
* update tidelift CLI properly
* not needed on PR
|
|
|
|
|
|
|
| |
* document memory_view usage, refactor frame_writer.write_frame
* improve test for changing frame_max in write_frame
* add integration test for write_frame/send_heartbeat
|
|
|
|
|
| |
* improve performance of _get_free_channel_id, fix channel max bug
* add integration tests for _get_free_channel_id performance improvement
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
failed connections. Fixes #378
|
|
|
|
|
| |
* reduce memory usage of Connection
* allow ValueError on _used_channel_ids.remove
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add new python versions to tox
* added codeql actions
* drop as we dont use travis
* added tidelift alignment action
* Adding two tests, for Connection.collect and Transport.close.
* revert 3.6 removal
* update classifier
* reorganize CI process and aded new python versions
* remove python 3.10 from CI actions for now
Co-authored-by: VinayGValsaraj <vinaygvalsaraj@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Added github actions lint CI.
* Remove .travis.yml
* Fix testing speedups in gh actions
|
| |
|
|
|
|
| |
raise ValueError if cert_reqs=ssl.CERT_NONE.
|
|
|
|
|
| |
* Pass long_description to setup()
* Remove unused import
|
| |
|
|
|
|
| |
tox-docker 2.0.0 changed its ini section format.
|
| |
|
| |
|