Skip to content

Commit

Permalink
use Addrinfo APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
irvingreid authored and PatrickTulskie committed Jan 27, 2023
1 parent e37f5dd commit 72dcf3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/scheduler/lock/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def extend_lock!

def hostname
local_hostname = Socket.gethostname
Socket.gethostbyname(local_hostname).first
Addrinfo.getaddrinfo(local_hostname, 'http').first.getnameinfo.first
rescue
local_hostname
end
Expand Down

0 comments on commit 72dcf3a

Please sign in to comment.