ports/databases/patroni/patches/patch-patroni_validator_py

16 lines
780 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
* 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
2023-10-02 06:44:43 +00:00
@@ -92,7 +92,7 @@ def validate_host_port(host_port: str, listen: bool =
2023-08-16 22:26:55 +00:00
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: