Skip to content

Commit

Permalink
NM + Network: Cleanup network state updates
Browse files Browse the repository at this point in the history
- 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 eduvpn#464 and hopefully eduvpn#492
  • Loading branch information
jwijenbergh committed Jul 14, 2022
1 parent 3119f2e commit 61ebeae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions eduvpn/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@

logger = logging.getLogger(__name__)

CHECK_NETWORK_INTERVAL = 1 # seconds


class ApplicationModel:
def __init__(self, common: EduVPN):
self.common = common
Expand Down Expand Up @@ -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)
1 change: 0 additions & 1 deletion eduvpn/ui/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61ebeae

Please sign in to comment.