Skip to content

Commit 5ea607a

Browse files
author
BiffoBear
committed
Convert DNS server IP address to dot-quad string before calling socket.connect.
1 parent 793e93f commit 5ea607a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_dns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def gethostbyname(self, hostname: bytes) -> Union[int, bytes]:
252252

253253
# Send DNS request packet
254254
self._sock.bind((None, _DNS_PORT))
255-
self._sock.connect((self._dns_server, _DNS_PORT))
255+
self._sock.connect((self._iface.pretty_ip(self._dns_server), _DNS_PORT))
256256
_debug_print(debug=self._debug, message="* DNS: Sending request packet...")
257257
self._sock.send(buffer)
258258

0 commit comments

Comments
 (0)