Add IPv6 support to StatusServer and related classes.
Fixes #117 Update: Fixes #121
Not sure whether this is complete. I think I need help with this part in hub/env.py:
if result == 'localhost':
# 'localhost' resolves to ::1 (ipv6) on many systems, which fails on default setup of
# docker, using 127.0.0.1 instead forces ipv4
result = '127.0.0.1'
If I allow the cs_host() to be localhost instead of 127.0.0.1, then it will start TCP servers on both v4/v6 sockets.
What is the problem with docker and this behavior?
Just saw a new EADDRINUSE problem when running lbry-sdk tests against this hub branch.
https://github.com/moodyjon/lbry-sdk/actions/runs/3911989925/jobs/6686050669
Converting this to draft status while investigating.
I did some work on StatusServer.start() to make it retry to overcome transient EADDRINUSE. It got a bit more complicated in order to handle cases like HOST=::,0.0.0.0, HOST=0.0.0.0,::, HOST=myserver1,myserver2, etc. I imported resolve_host() from my moodyjon/lbry-sdk:ipv6 branch to do name resolution.
Have not seen EADDRINUSE since that one occurrence. Not sure what the root cause of that was. Possible infrastructure?