forked from logstash-plugins/logstash-filter-dns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle lookup misses without exceptions
By using `Resolv#each_name` and `Resolv#each_address`, and returning the first match from the block or returning nil if no matches were found, we can mirror the behavior of `Resolv#getname` and `Resolv#getaddress` without raising exceptions on lookup misses. Adjusts flow-control to handle a nil return value as a lookup miss instead of relying on exception handlers. Resolves: logstash-plugins#60
- Loading branch information
Showing
2 changed files
with
56 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters