diff options
Diffstat (limited to 'mullvad-api/src')
| -rw-r--r-- | mullvad-api/src/rest.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mullvad-api/src/rest.rs b/mullvad-api/src/rest.rs index 4297bd92ed..517e0b3a03 100644 --- a/mullvad-api/src/rest.rs +++ b/mullvad-api/src/rest.rs @@ -256,6 +256,13 @@ impl RequestServiceHandle { .map_err(|_| Error::SendError)?; completion_rx.await.map_err(|_| Error::ReceiveError)? } + + /// Forcibly update the connection mode. + pub async fn next_api_endpoint(&self) -> Result<()> { + self.tx + .unbounded_send(RequestCommand::NextApiConfig) + .map_err(|_| Error::SendError) + } } #[derive(Debug)] |
