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,12 +706,12 @@ class ftp_server (asyncore.dispatcher): ...@@ -706,12 +706,12 @@ class ftp_server (asyncore.dispatcher):
self.port = port self.port = port
self.authorizer = authorizer self.authorizer = authorizer
if hostname is None: try:
self.hostname = socket.gethostname() self.hostname = socket.gethostbyaddr(ip)[0]
else: except socket.error:
self.hostname = hostname self.hostname = ip
# statistics # statistics
self.total_sessions = counter() self.total_sessions = counter()
self.closed_sessions = counter() self.closed_sessions = counter()
self.total_files_out = counter() self.total_files_out = 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