ipv6 is complicated

This commit is contained in:
j 2023-10-12 12:57:18 +01:00
parent 13adeddd1b
commit 6559939fc4

View file

@ -150,7 +150,11 @@ def main():
player = get_player(fullscreen=not args.window)
listen = '::' if ':' in args.peer else '0.0.0.0'
if ':' in args.peer:
listen = '::'
ThreadingUDPServer.address_family = socket.AF_INET6
else:
listen = '0.0.0.0'
server = ThreadingUDPServer((listen, args.port), Handler)
server.allow_reuse_address = True
server.player = Player(peer, player, args.playlist, args.prefix)