Skip to content

Commit

Permalink
Get rid of using Socket.gethostbyname
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 31, 2020
1 parent 3e1aea4 commit 0eec4ae
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/webrick/utils.rb
Expand Up @@ -45,12 +45,7 @@ def su(user)
##
# The server hostname
def getservername
host = Socket::gethostname
begin
Socket::gethostbyname(host)[0]
rescue
host
end
Socket::gethostname
end
module_function :getservername

Expand Down

0 comments on commit 0eec4ae

Please sign in to comment.