1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00

Removed Semaphore for configuration file

This commit is contained in:
Donald Cheng Hong Zou 2021-12-31 13:29:37 -05:00
parent 06dd641274
commit e2c8b3bf02

View File

@ -519,7 +519,6 @@ Flask Functions
# Before request
@app.before_request
def auth_req():
sem.acquire(timeout=1)
conf = get_dashboard_conf()
req = conf.get("Server", "auth_req")
session['update'] = UPDATE
@ -536,10 +535,6 @@ def auth_req():
else:
session['message'] = ""
conf.clear()
try:
sem.release()
except RuntimeError as e:
print("RuntimeError: cannot release un-acquired lock")
return redirect(url_for("signin"))
else:
if request.endpoint in ['signin', 'signout', 'auth', 'settings', 'update_acct', 'update_pwd',