Fix support for multiple ephemeral ports (#1399)

This commit is contained in:
Abhinav Singh 2024-04-25 09:51:52 +05:30 committed by GitHub
parent 81aa82b9a4
commit 5b0c484e6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -39,9 +39,9 @@ class ListenerPool:
if self.flags.unix_socket_path:
self.add(UnixSocketListener)
hostnames = {self.flags.hostname, *self.flags.hostnames}
ports = set(self.flags.ports)
ports = list(self.flags.ports)
if not self.flags.unix_socket_path:
ports.add(self.flags.port)
ports.append(self.flags.port)
for hostname, port in itertools.product(hostnames, ports):
self.add(TcpSocketListener, hostname=hostname, port=port)