From 64bb88e6e23c5c596e97055807138c10e19beec8 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 13 Dec 2024 17:34:45 +0100 Subject: [PATCH 1/2] App: Add a renew delay by default 1 second I am getting a report that renewing times out. This is strange! What if we delay after disconnecting? Let's try by default 1 second --- eduvpn/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eduvpn/app.py b/eduvpn/app.py index 0d5b722e..28d2036f 100644 --- a/eduvpn/app.py +++ b/eduvpn/app.py @@ -458,6 +458,7 @@ def reconnect(success: bool = True): if callback: callback(False) return + time.sleep(int(os.getenv("EDUVPN_RENEW_DELAY", "1"))) # Delete the OAuth access and refresh token # Start the OAuth authorization flow self.common.renew_session() From cd11c8012e1c82834b0f9307c4688874f8d7a3f1 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 13 Dec 2024 17:37:36 +0100 Subject: [PATCH 2/2] CLI: Execute eduvpn when run from shell --- eduvpn/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eduvpn/cli.py b/eduvpn/cli.py index b0b3f955..8a338ea7 100644 --- a/eduvpn/cli.py +++ b/eduvpn/cli.py @@ -731,3 +731,7 @@ def letsconnect(): _common = common.EduVPN(LETSCONNECT_CLIENT_ID, __version__, str(LETSCONNECT_CONFIG_PREFIX)) cmd = CommandLine("Let's Connect!", LETS_CONNECT, _common) cmd.start() + + +if __name__ == "__main__": + eduvpn()