Fix for http server not started correctly

This commit is contained in:
Tomas Groth 2014-09-09 14:55:56 +02:00
parent 3769a01682
commit 2fbbc85679

View File

@ -144,6 +144,7 @@ class OpenLPServer(RegistryProperties):
try: try:
self.httpd = server_class((address, port), CustomHandler) self.httpd = server_class((address, port), CustomHandler)
log.debug("Server started for class %s %s %d" % (server_class, address, port)) log.debug("Server started for class %s %s %d" % (server_class, address, port))
break
except OSError: except OSError:
log.debug("failed to start http server thread state %d %s" % log.debug("failed to start http server thread state %d %s" %
(loop, self.http_thread.isRunning())) (loop, self.http_thread.isRunning()))
@ -151,6 +152,8 @@ class OpenLPServer(RegistryProperties):
time.sleep(0.1) time.sleep(0.1)
except: except:
log.error('Failed to start server ') log.error('Failed to start server ')
loop += 1
time.sleep(0.1)
def stop_server(self): def stop_server(self):
""" """