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
1 changed files with 3 additions and 0 deletions

View File

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