diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-11-19 14:46:19 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-11-19 14:49:17 +0100 |
| commit | d0cddd4a50f64bba5259b07af8799610ee935c80 (patch) | |
| tree | 5c17166b3626e08fea11f2282cf675128752550a | |
| parent | 75603b42d7732440d225d1676f6ea7698ebd26b4 (diff) | |
| download | mullvadvpn-d0cddd4a50f64bba5259b07af8799610ee935c80.tar.xz mullvadvpn-d0cddd4a50f64bba5259b07af8799610ee935c80.zip | |
Turn off HTTP keep alive for all RPC requests
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | mullvad-rpc/src/https_client_with_sni.rs | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index efeff0df33..2962415bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,8 @@ Line wrap the file at 100 chars. Th - Cancel pending system notifications when the app becomes visible. - Transition to connected state after all routes are configured. Avoids problems with reaching the internet directly after the app says it's connected. +- Disable keep alive on API RPC requests. Should stop reuse of invalid sockets after tunnel state + changes. #### Windows - Use proper app id in the registry. This avoids false-positives with certain anti-virus software. diff --git a/mullvad-rpc/src/https_client_with_sni.rs b/mullvad-rpc/src/https_client_with_sni.rs index 8ec091ac47..62dc66df28 100644 --- a/mullvad-rpc/src/https_client_with_sni.rs +++ b/mullvad-rpc/src/https_client_with_sni.rs @@ -39,7 +39,10 @@ impl ClientCreator for HttpsClientWithSni { fn create(&self, handle: &Handle) -> Result<Client<Self::Connect, Body>, Self::Error> { let mut connector = HttpsConnectorWithSni::new(&self.ca_path, handle)?; connector.set_sni_hostname(Some(self.sni_hostname.clone())); - let client = Client::configure().connector(connector).build(handle); + let client = Client::configure() + .keep_alive(false) + .connector(connector) + .build(handle); Ok(client) } } |
