15 lines
780 B
Text
15 lines
780 B
Text
* socket.getaddrinfo with "" passed as port on OpenBSD returns error:
|
|
[Errno -8] service not supported for ai_socktype
|
|
|
|
Index: patroni/validator.py
|
|
--- patroni/validator.py.orig
|
|
+++ patroni/validator.py
|
|
@@ -92,7 +92,7 @@ def validate_host_port(host_port: str, listen: bool =
|
|
for host in hosts:
|
|
# Check if "socket.IF_INET" or "socket.IF_INET6" is being used and instantiate a socket with the identified
|
|
# protocol
|
|
- proto = socket.getaddrinfo(host, "", 0, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
|
|
+ proto = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
|
|
s = socket.socket(proto[0][0], socket.SOCK_STREAM)
|
|
try:
|
|
if s.connect_ex((host, port)) == 0:
|