Explorar o código

global_log_file_lock for windows only needs to be initialized once

bel %!s(int64=10) %!d(string=hai) anos
pai
achega
665dd8ac41
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -7095,7 +7095,7 @@ struct mg_context *mg_start(const struct mg_callbacks *callbacks,
     WSADATA data;
     WSAStartup(MAKEWORD(2,2), &data);
 #pragma warning(suppress: 28125)
-    InitializeCriticalSection(&global_log_file_lock);
+    if (!sTlsInit) InitializeCriticalSection(&global_log_file_lock);
 #endif /* _WIN32 && !__SYMBIAN32__ */
 
     /* Check if the config_options and the corresponding enum have compatible sizes. */