mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-28 12:22:59 +02:00
...
This commit is contained in:
parent
665105d96c
commit
2fec4aa6c3
1 changed files with 7 additions and 0 deletions
|
|
@ -221,7 +221,12 @@ def start(self):
|
|||
if not ip or ip.startswith('127.'):
|
||||
raise
|
||||
cherrypy.log('Trying to bind to single interface: '+ip)
|
||||
# Change the host we listen on
|
||||
cherrypy.config.update({'server.socket_host' : ip})
|
||||
# This ensures that the change is actually applied
|
||||
cherrypy.server.socket_host = ip
|
||||
cherrypy.server.httpserver = cherrypy.server.instance = None
|
||||
|
||||
cherrypy.engine.start()
|
||||
|
||||
self.is_running = True
|
||||
|
|
@ -231,6 +236,8 @@ def start(self):
|
|||
cherrypy.engine.block()
|
||||
except Exception as e:
|
||||
self.exception = e
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
self.is_running = False
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue