Skip to content

Commit fb13f19

Browse files
committed
let Jvm live longer
1 parent a6d3325 commit fb13f19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/src/async_api/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ impl Jvm {
6969

7070
// Create and return the Instance
7171
let instance = rx.await?;
72-
let new_jni_env = Jvm::attach_thread()?.jni_env;
72+
let new_jvm = Jvm::attach_thread()?;
73+
let new_jni_env = new_jvm.jni_env;
7374
Self::do_return(new_jni_env, instance)?
7475
}
7576

0 commit comments

Comments
 (0)