From 2fec4aa6c3719767d52c8e4558697dbc4f088ebb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 May 2011 13:33:52 -0600 Subject: [PATCH] ... --- src/calibre/library/server/base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/calibre/library/server/base.py b/src/calibre/library/server/base.py index 862e724809..319feefa44 100644 --- a/src/calibre/library/server/base.py +++ b/src/calibre/library/server/base.py @@ -221,7 +221,12 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache, 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 @@ class LibraryServer(ContentServer, MobileServer, XMLServer, OPDSServer, Cache, cherrypy.engine.block() except Exception as e: self.exception = e + import traceback + traceback.print_exc() finally: self.is_running = False try: