Commit c3bcf460 authored by Andreas Jung's avatar Andreas Jung

Collector #1992: unified visible hostname/ip address during the startup

phase for FTP and HTTP servers
parent 9f289726
......@@ -706,10 +706,10 @@ class ftp_server (asyncore.dispatcher):
self.port = port
self.authorizer = authorizer
if hostname is None:
self.hostname = socket.gethostname()
else:
self.hostname = hostname
try:
self.hostname = socket.gethostbyaddr(ip)[0]
except socket.error:
self.hostname = ip
# statistics
self.total_sessions = counter()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment