diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 6ecdf4f3..0824fdae 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -1802,15 +1802,13 @@ static void uwsgi_python_harakiri(int wid) { if (fd < 1) goto exit; - int ret = uwsgi_waitfd(fd, uwsgi.socket_timeout); - if (ret <= 0) { - goto cleanup; - } - ssize_t len = read(fd, buf, 8192); - if (len <= 0) { - goto cleanup; - } - uwsgi_log("%.*s", (int) len, buf); + for(;;) { + int ret = uwsgi_waitfd(fd, uwsgi.socket_timeout); + if (ret <= 0) goto cleanup; + ssize_t len = read(fd, buf, 8192); + if (len <= 0) goto cleanup; + uwsgi_log("%.*s", (int) len, buf); + } cleanup: close(fd); diff --git a/plugins/python/tracebacker.c b/plugins/python/tracebacker.c index 8bf01c25..542ef614 100644 --- a/plugins/python/tracebacker.c +++ b/plugins/python/tracebacker.c @@ -114,7 +114,6 @@ void *uwsgi_python_tracebacker_thread(void *foobar) { } PyObject *frame = PyIter_Next(frames_iter); while(frame) { - PyObject *thread_id = PyTuple_GetItem(frame, 0); if (!thread_id) goto next2;