F-9457: correct the logging-callback registration comment to note JNI_OnUnload deregistration

pull/401/head
Chris Conlon 2026-08-14 12:40:54 -06:00
parent f32a5b812b
commit e3c36ca604
1 changed files with 3 additions and 2 deletions

View File

@ -60,8 +60,9 @@ static wolfSSL_Mutex g_loggingCbMutex;
static int g_loggingCbMutexInit = 0;
/* Tracks one-time native registration of NativeLoggingCallback and its return
* value. We register once and never deregister: wolfssl_log reads LogFunction
* without a lock, so clearing it while another thread logs would crash.
* value. We do not deregister during normal operation: wolfssl_log reads
* LogFunction without a lock, so clearing it while another thread logs would
* crash. JNI_OnUnload deregisters it after JVM execution has ended.
* Guarded by g_loggingCbMutex. */
static int g_loggingCbNativeReg = 0;
static int g_loggingCbNativeRet = 0;