-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes a race condition with multiple simultaneous get requests. #1807
Conversation
Thanks for ✨PR✨ I see there are style issues. If you fix, I can merge this PR |
I'm not sure how i can fix this error. |
I think the formatter prefers the with notation: lock = Lock()
@app.route("/api/tts", methods=["GET"])
def tts():
with lock:
text = request.args.get("text")
... rather than that: lock = Lock()
@app.route("/api/tts", methods=["GET"])
def tts():
lock.acquire()
text = request.args.get("text")
...
lock.release() |
Reformatted the file i changed failed this time?
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels. |
This fixes an issue where, if you make multiple requests at the same time, the results will sound corrupted or you will get an internal server error.