Make sure httpd server stops after a certain time frame.
This commit is contained in:
@@ -93,13 +93,18 @@ class Crest():
|
||||
self.ssoTimer.stop()
|
||||
wx.CallAfter(pub.sendMessage, 'logout_success', message=None)
|
||||
|
||||
def stopServer(self):
|
||||
self.httpd.stop()
|
||||
self.httpdTimer.stop()
|
||||
|
||||
def startServer(self):
|
||||
thread.start_new_thread(self.httpd.serve, ())
|
||||
self.httpdTimer = RepeatedTimer(60, self.stopServer)
|
||||
self.httpdTimer.start()
|
||||
self.state = str(uuid.uuid4())
|
||||
return self.eve.auth_uri(scopes=self.scopes, state=self.state)
|
||||
|
||||
def handleLogin(self, message):
|
||||
self.httpd.stop()
|
||||
if not message:
|
||||
return
|
||||
|
||||
@@ -147,5 +152,3 @@ class Crest():
|
||||
|
||||
wx.CallAfter(pub.sendMessage, 'login_success', type=1)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user