F-15724: correct JNI_OnUnload timing in logging callback registration comment

pull/441/head
Chris Conlon 2026-10-20 15:12:35 -06:00
parent c3fe90dedc
commit ab369c3ca5
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ static int g_loggingCbMutexInit = 0;
/* Tracks one-time native registration of NativeLoggingCallback and its return
* 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.
* crash. JNI_OnUnload deregisters it when the class loader that loaded this
* library is garbage collected.
* Guarded by g_loggingCbMutex. */
static int g_loggingCbNativeReg = 0;
static int g_loggingCbNativeRet = 0;