Unverified Commit 25725957 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #7121 from Dave-in-lafayette/patch-2

fix for crash during panic before all threads are up
parents 72f07519 80b6f9b0
...@@ -266,7 +266,7 @@ void bioKillThreads(void) { ...@@ -266,7 +266,7 @@ void bioKillThreads(void) {
int err, j; int err, j;
for (j = 0; j < BIO_NUM_OPS; j++) { for (j = 0; j < BIO_NUM_OPS; j++) {
if (pthread_cancel(bio_threads[j]) == 0) { if (bio_threads[j] && pthread_cancel(bio_threads[j]) == 0) {
if ((err = pthread_join(bio_threads[j],NULL)) != 0) { if ((err = pthread_join(bio_threads[j],NULL)) != 0) {
serverLog(LL_WARNING, serverLog(LL_WARNING,
"Bio thread for job type #%d can be joined: %s", "Bio thread for job type #%d can be joined: %s",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment