Skip to content

Commit

Permalink
Merge pull request #1915 from OpenC3/catch_hostname_lookup_errors
Browse files Browse the repository at this point in the history
Add exception catch on python hostname lookup
  • Loading branch information
ryanmelt authored Feb 22, 2025
2 parents 482621e + 3ba61a1 commit 2adda68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openc3/python/openc3/interfaces/tcpip_server_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ def _listen_thread_body(self, listen_socket, listen_write, listen_read, thread_r
if self.cancel_threads:
break
host_ip, port = address
hostname, _, _ = socket.gethostbyaddr(host_ip)
try:
hostname, _, _ = socket.gethostbyaddr(host_ip)
except Exception:
hostname = "UNKNOWN"

# Configure TCP_NODELAY option
client_socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

Expand Down

0 comments on commit 2adda68

Please sign in to comment.