From 61ebeae2143731d84c9212945824f24c7540eb7e Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 16 Jun 2022 13:30:49 +0200 Subject: [PATCH] NM + Network: Cleanup network state updates - Use the pygobject signals to properly check whether we have the correct UUID - Delete polling every second as that is hopefully not useful any more - Delete unknown state retry mechanism for the same reason - Should fix #464 and hopefully #492 --- eduvpn/app.py | 5 +---- eduvpn/ui/ui.py | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/eduvpn/app.py b/eduvpn/app.py index b0f78837..c324bbd2 100644 --- a/eduvpn/app.py +++ b/eduvpn/app.py @@ -15,9 +15,6 @@ logger = logging.getLogger(__name__) -CHECK_NETWORK_INTERVAL = 1 # seconds - - class ApplicationModel: def __init__(self, common: EduVPN): self.common = common @@ -175,6 +172,6 @@ def initialize_network(self): pass def on_network_update_callback(state): - network.on_state_update_callback(self, state) + print("Network state update") nm.subscribe_to_status_changes(on_network_update_callback) diff --git a/eduvpn/ui/ui.py b/eduvpn/ui/ui.py index b1e79fa7..fd855133 100644 --- a/eduvpn/ui/ui.py +++ b/eduvpn/ui/ui.py @@ -17,7 +17,6 @@ from gi.repository import Gtk, GObject, GdkPixbuf from ..settings import HELP_URL -from .. import network as network_state from ..server import CustomServer, StatusImage from ..app import Application from ..nm import nm_available, nm_managed