Get rid of using Socket.gethostbyname
This commit is contained in:
parent
3e1aea4613
commit
0eec4ae851
@ -45,12 +45,7 @@ module WEBrick
|
||||
##
|
||||
# The server hostname
|
||||
def getservername
|
||||
host = Socket::gethostname
|
||||
begin
|
||||
Socket::gethostbyname(host)[0]
|
||||
rescue
|
||||
host
|
||||
end
|
||||
Socket::gethostname
|
||||
end
|
||||
module_function :getservername
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user