Selaa lähdekoodia

Merge branch 'fix_crash_during_handler_removal' of github.com:jenik1/civetweb into fix_crash_during_handler_removal

eugene 5 vuotta sitten
vanhempi
commit
7b3281220d
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      src/civetweb.c

+ 5 - 5
src/civetweb.c

@@ -13535,13 +13535,13 @@ mg_set_handler_type(struct mg_context *phys_ctx,
     if (NULL == pthread_getspecific(sTlsKey))
     if (NULL == pthread_getspecific(sTlsKey))
     {
     {
         is_tls_set = 1;
         is_tls_set = 1;
-        tls.is_master = -1;
-        tls.thread_idx = phys_ctx->starter_thread_idx;
-#if defined(_WIN32)
-        tls.pthread_cond_helper_mutex = NULL;
+        tls.is_master = -1;
+        tls.thread_idx = phys_ctx->starter_thread_idx;
+#if defined(_WIN32)
+        tls.pthread_cond_helper_mutex = NULL;
 #endif
 #endif
         pthread_setspecific(sTlsKey, &tls);
         pthread_setspecific(sTlsKey, &tls);
-    }
+    }
 
 
 	mg_lock_context(phys_ctx);
 	mg_lock_context(phys_ctx);