When processing events, AttachCurrentThread is called, but matching
DetachCurrentThread was not being called

This prevented main thread from exiting
This commit is contained in:
Brenton Bostick
2023-08-04 10:27:50 -04:00
parent dd0d606422
commit dd45f9fb45
2 changed files with 79 additions and 0 deletions

View File

@@ -197,6 +197,8 @@ void Events::sendToUser(zts_event_msg_t* msg)
id = msg->peer ? msg->peer->peer_id : 0;
}
env->CallVoidMethod(javaCbObjRef, javaCbMethodId, id, msg->event_code);
jvm->DetachCurrentThread();
}
#endif // ZTS_ENABLE_JAVA
#ifdef ZTS_ENABLE_PINVOKE