Avoid infinite loop if server crashes
This commit is contained in:
@@ -28,6 +28,7 @@ class HomeHandler(web.RequestHandler):
|
|||||||
class AuthHandler(web.RequestHandler):
|
class AuthHandler(web.RequestHandler):
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
|
try:
|
||||||
global oauth_state
|
global oauth_state
|
||||||
global oauth_code
|
global oauth_code
|
||||||
global oauth_error
|
global oauth_error
|
||||||
@@ -37,7 +38,7 @@ class AuthHandler(web.RequestHandler):
|
|||||||
oauth_error = self.get_argument('error', default='error_placeholder')
|
oauth_error = self.get_argument('error', default='error_placeholder')
|
||||||
|
|
||||||
self.render('auth.html', state=oauth_state, code=oauth_code, error=oauth_error)
|
self.render('auth.html', state=oauth_state, code=oauth_code, error=oauth_error)
|
||||||
|
finally:
|
||||||
ioloop.IOLoop.current().stop()
|
ioloop.IOLoop.current().stop()
|
||||||
|
|
||||||
class OAuthTool(object):
|
class OAuthTool(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user