Sha256: de482735bfaae1879d07096158002cb2d01580562f540b01a7149a43721646ac

Contents?: true

Size: 963 Bytes

Versions: 37

Compression:

Stored size: 963 Bytes

Contents

require "resolv"

# ref:
#   https://github.com/logstash-plugins/logstash-filter-dns/issues/51
#   https://github.com/jruby/jruby/pull/5722
#
# JRuby versions starting at 9.2.0.0 have a bug in resolv.rb with a leak between the
# DNS.allocate_request_id/DNS.free_request_id methods.
#
# We are opting to load a patched full resolv.rb instead of monkey patching the
# offending methods because we do not yet know in which upcoming version of JRuby
# this will be fixed and we want to avoid potential conflicting monkey patches.
# A spec which will break on JRuby upgrade will redirect here
# to make a manual verification and eventually remove that patch here once the fix is
# made in the JRuby version of resolv.rb.

if Gem::Version.new(JRUBY_VERSION) >= Gem::Version.new("9.2.0.0")
  # save verbose level and mute the "warning: already initialized constant"
  warn_level = $VERBOSE
  $VERBOSE = nil

  require_relative "resolv_9270"

  $VERBOSE = warn_level
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
logstash-core-6.8.23-java lib/logstash/patches/resolv.rb
logstash-core-6.8.22-java lib/logstash/patches/resolv.rb
logstash-core-6.8.21-java lib/logstash/patches/resolv.rb
logstash-core-6.8.20-java lib/logstash/patches/resolv.rb
logstash-core-6.8.19-java lib/logstash/patches/resolv.rb
logstash-core-6.8.18-java lib/logstash/patches/resolv.rb
logstash-core-6.8.17-java lib/logstash/patches/resolv.rb
logstash-core-6.8.16-java lib/logstash/patches/resolv.rb
logstash-core-6.8.15-java lib/logstash/patches/resolv.rb
logstash-core-6.8.14-java lib/logstash/patches/resolv.rb
logstash-core-6.8.13-java lib/logstash/patches/resolv.rb
logstash-core-6.8.12-java lib/logstash/patches/resolv.rb
logstash-core-6.8.11-java lib/logstash/patches/resolv.rb
logstash-core-6.8.10-java lib/logstash/patches/resolv.rb
logstash-core-6.8.9-java lib/logstash/patches/resolv.rb
logstash-core-6.8.8-java lib/logstash/patches/resolv.rb
logstash-core-6.8.7-java lib/logstash/patches/resolv.rb
logstash-core-7.5.2-java lib/logstash/patches/resolv.rb
logstash-core-7.5.1-java lib/logstash/patches/resolv.rb
logstash-core-6.8.6-java lib/logstash/patches/resolv.rb