diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-09-25 14:23:35 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-09-26 11:15:15 +0000 |
| commit | f45dfa3bce8c0c8a6b85c9dded3bf0963ffcccff (patch) | |
| tree | a46d6a47af581d49101a30bfa91c5e2e4257b92d | |
| parent | 861ae8c1856c18d1e77b032626c8428df4c4c2d3 (diff) | |
| download | mullvadvpn-f45dfa3bce8c0c8a6b85c9dded3bf0963ffcccff.tar.xz mullvadvpn-f45dfa3bce8c0c8a6b85c9dded3bf0963ffcccff.zip | |
Attach thread to Java VM permanently
| -rw-r--r-- | mullvad-jni/src/vpn_service_tun_provider.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mullvad-jni/src/vpn_service_tun_provider.rs b/mullvad-jni/src/vpn_service_tun_provider.rs index f55bc466d6..0d3f28b754 100644 --- a/mullvad-jni/src/vpn_service_tun_provider.rs +++ b/mullvad-jni/src/vpn_service_tun_provider.rs @@ -93,7 +93,7 @@ impl VpnServiceTunProvider { if self.active_tun.is_none() || self.last_tun_config != config { let env = self .jvm - .attach_current_thread() + .attach_current_thread_as_daemon() .map_err(Error::AttachJvmToThread)?; let create_tun_method = env .get_method_id( @@ -186,7 +186,7 @@ impl Tun for VpnServiceTun { fn bypass(&mut self, socket: RawFd) -> Result<(), BoxedError> { let env = self .jvm - .attach_current_thread() + .attach_current_thread_as_daemon() .map_err(|cause| BoxedError::new(Error::AttachJvmToThread(cause)))?; let create_tun_method = env .get_method_id(&self.class, "bypass", "(I)Z") |
