-
Notifications
You must be signed in to change notification settings - Fork 678
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SystemError exception when async_args PyTuple is reused. #1408
In the case where the uwsgi_python_create_env_cheat env behavior is used, the async_args PyTuple is reused on every request. In some cases, the reference count on async_args may be > 1 at the end of a request/response cycle. If PyTuple_SetItem is called with a reference count > 1, a SystemError is raised. When the cheat env behavior is used, the environ dictionary is also reused between requests. This enables the elimination of redundant PyTuple_SetItem calls by first checking to see if the environ dictionary is already in the async_args tuple.
- Loading branch information
Showing
3 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters