Skip to content

Commit

Permalink
Add connection edge case integration tests
Browse files Browse the repository at this point in the history
We discovered that there is a bug with which strategy each error has to have. Connection refused or connection reset are not retried on UDS Connections.
  • Loading branch information
kbogtob committed Mar 23, 2020
1 parent f2d7d5b commit 41291ec
Show file tree
Hide file tree
Showing 3 changed files with 466 additions and 225 deletions.
3 changes: 3 additions & 0 deletions lib/datadog/statsd/uds_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def send_message(message)
socket.sendmsg_nonblock(message)
rescue Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ENOENT => e
@socket = nil
# TODO: FIXME: This error should be considered as a retryable error in the
# Connection class. An even better solution would be to make BadSocketError inherit
# from a specific retryable error class in the Connection class.
raise BadSocketError, "#{e.class}: #{e}"
end
end
Expand Down
Loading

0 comments on commit 41291ec

Please sign in to comment.