summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-12-05 11:30:27 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-12-05 12:17:56 +0100
commitb4e1055ca29a373cd74dd226838a6dcdbc76cee8 (patch)
treecc8d160da44bdfb5a7424d71c2b4a99115e7d7cf
parentaecaaa2a5652bf787e8000eaeea5b820456122ee (diff)
downloadmullvadvpn-b4e1055ca29a373cd74dd226838a6dcdbc76cee8.tar.xz
mullvadvpn-b4e1055ca29a373cd74dd226838a6dcdbc76cee8.zip
Disable http keep-alive on location requests
-rw-r--r--mullvad-rpc/src/rest.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/mullvad-rpc/src/rest.rs b/mullvad-rpc/src/rest.rs
index ed68e57964..05665e4fd0 100644
--- a/mullvad-rpc/src/rest.rs
+++ b/mullvad-rpc/src/rest.rs
@@ -33,7 +33,10 @@ type RequestReceiver = mpsc::UnboundedReceiver<(Request, oneshot::Sender<Result<
pub fn create_https_client<P: AsRef<Path>>(ca_path: P, handle: &Handle) -> Result<RequestSender> {
let connector = HttpsConnectorWithSni::new(ca_path, handle)?;
- let client = Client::configure().connector(connector).build(handle);
+ let client = Client::configure()
+ .keep_alive(false)
+ .connector(connector)
+ .build(handle);
let (request_tx, request_rx) = mpsc::unbounded();
handle.spawn(create_request_processing_future(request_rx, client));