From 0e3ede4f0aa6565e6663132c59d361c8034f1e02 Mon Sep 17 00:00:00 2001 From: sTiKyt Date: Sat, 22 Aug 2020 18:41:24 +0000 Subject: [PATCH] Created close_latest_connection method for ngrok --- controllers/ngrok_controller.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/ngrok_controller.py b/controllers/ngrok_controller.py index 2e1d79d..5e0a990 100644 --- a/controllers/ngrok_controller.py +++ b/controllers/ngrok_controller.py @@ -14,3 +14,9 @@ class NgrokController: self._tunnels = None self._ngrok_url = None + def close_latest_connection(self): + try: + self._model.disconnect(self._ngrok_url) + except self._exceptions.PyngrokError: + print("Can't find any latest connections.") # FIXME replace with View entry + pass