Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds some extra description to socket errors in order to distinguish similar errors #798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions datadog/dogstatsd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def _get_uds_socket(cls, socket_path, timeout):
def _get_udp_socket(cls, host, port, timeout):
log.debug("Connecting to %s:%s", host, port)
addrinfo = socket.getaddrinfo(host, port, 0, socket.SOCK_DGRAM)
# Override gai.conf order for backwrads compatibility: prefer
# Override gai.conf order for backwards compatibility: prefer
# v4, so that a v4-only service on hosts with both addresses
# still works.
addrinfo.sort(key=lambda v: v[0] == socket.AF_INET, reverse=True)
Expand Down Expand Up @@ -1012,7 +1012,7 @@ def _xmit_packet(self, packet, is_telemetry):
pass
except (socket.herror, socket.gaierror) as socket_err:
log.warning(
"Error submitting packet: %s, dropping the packet and closing the socket",
"Address-related error submitting packet: %s, dropping the packet and closing the socket.",
socket_err,
)
self.close_socket()
Expand Down
Loading