Run submission in a separate thread, and more explicit state

Also more explicit timeouts and an overall better handling of errors.
This commit is contained in:
2018-08-14 16:36:43 +02:00
parent 5d86b87f40
commit b64577df2e
8 changed files with 191 additions and 66 deletions

View File

@@ -50,7 +50,7 @@ class TokenHTTPServer(http.server.HTTPServer):
self.log.debug('Finding free port starting at %s', local_addr)
return sockutil.find_free_port(local_addr)
def wait_for_token(self, timeout=None):
def wait_for_token(self, timeout: float):
"""Starts the HTTP server, waits for the Token."""
if self.auth_token is None: