Open ngie-eign opened 10 years ago
That's a very valid point, but this is a work around for a gevent bug (or eventlet, cannot remember which) where it cannot resolve localhost
for some reason. So presumably the same problem would be present if using getaddrinfo
. Maybe it could use some way to verify that the address work and if not attempt the ipv6 equivalent.
Perhaps, but this could be conditionalized depending on the version of the third party library and documented as a caveat. Right now it's not really documented.
Just want to point out that when you're working with WSL2 to run RabbitMQ in a docker container, the port is forwarded from the WSL2 VM to the host, but only on localhost
and not on 127.0.0.1
. This if statement basically kills my development setup!
contributions to improve this will be highly regarded.
The code in kombu.transport.pyamqp ( https://github.com/celery/kombu/blob/master/kombu/transport/pyamqp.py#L98 ) should use socket.getaddrinfo in order to determine the host IP instead of assuming it's always 127.0.0.1