reset random seed on first python spooler job

This commit is contained in:
roberto@debian32
2011-06-18 09:32:23 +02:00
parent ca82b99f42
commit aa56f99ee2

View File

@@ -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;