Browse Source

Move Bonjour/ZeroConfig to after SABnzbd start

Slow to mount or to fail (1-2 seconds)
tags/2.3.0Alpha1
Safihre 8 years ago
parent
commit
731a3bcb22
  1. 16
      SABnzbd.py

16
SABnzbd.py

@ -1391,14 +1391,7 @@ def main():
# Wait for server to become ready
cherrypy.engine.wait(cherrypy.process.wspbus.states.STARTED)
# Bonjour needs a ip. Lets try to find it.
try:
z_host = socket.gethostbyname(socket.gethostname())
except socket.gaierror:
z_host = cherryhost
sabnzbd.zconfig.set_bonjour(z_host, cherryport)
# Window Service support
mail = None
if sabnzbd.WIN32:
if enable_https:
@ -1454,6 +1447,13 @@ def main():
check_latest_version()
autorestarted = False
# ZeroConfig/Bonjour needs a ip. Lets try to find it.
try:
z_host = socket.gethostbyname(socket.gethostname())
except socket.gaierror:
z_host = cherryhost
sabnzbd.zconfig.set_bonjour(z_host, cherryport)
# Have to keep this running, otherwise logging will terminate
timer = 0
while not sabnzbd.SABSTOP:

Loading…
Cancel
Save