Don't check port in tor-only mode

refs https://github.com/HelloZeroNet/ZeroNet/issues/2456
This commit is contained in:
caryoscelus 2022-03-27 18:45:45 +00:00
parent 788ef5ca5f
commit 35fd399e01
1 changed files with 3 additions and 2 deletions

View File

@ -152,8 +152,9 @@ class FileServer(ConnectionServer):
FileRequest = imp.load_source("FileRequest", "src/File/FileRequest.py").FileRequest
def portCheck(self):
if config.offline:
self.log.info("Offline mode: port check disabled")
if config.offline or config.tor == 'always':
msg = "Offline mode" if config.offline else "Tor-only"
self.log.info(f'{msg}: port check disabled')
res = {"ipv4": None, "ipv6": None}
self.port_opened = res
return res