mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-05-01 20:33:43 +00:00
reset random seed on first python spooler job
This commit is contained in:
@@ -1000,9 +1000,15 @@ void uwsgi_python_add_item(char *key, uint16_t keylen, char *val, uint16_t valle
|
||||
|
||||
int uwsgi_python_spooler(char *buf, uint16_t len) {
|
||||
|
||||
static int random_seed_reset = 0;
|
||||
PyObject *spool_dict = PyDict_New();
|
||||
PyObject *spool_func, *pyargs, *ret;
|
||||
|
||||
if (!random_seed_reset) {
|
||||
uwsgi_python_reset_random_seed();
|
||||
random_seed_reset = 1;
|
||||
}
|
||||
|
||||
if (!up.embedded_dict) {
|
||||
// ignore
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user