mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
ui: fixed delay closing the GUI
When closing the GUI we were not stopping notifications channel in all cases, causing some issues (delays, log in/out problems, ...). Closes #1217
This commit is contained in:
parent
9a51e88ebc
commit
cdf93c72c1
2 changed files with 9 additions and 3 deletions
|
@ -243,3 +243,7 @@ Examples:
|
||||||
on_exit()
|
on_exit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
finally:
|
||||||
|
if service:
|
||||||
|
# finish gracefully, closing notifications channel.
|
||||||
|
service.close()
|
||||||
|
|
|
@ -743,6 +743,11 @@ class UIService(ui_pb2_grpc.UIServicer, QtWidgets.QGraphicsObject):
|
||||||
elif kwargs['action'] == self.NODE_DELETE:
|
elif kwargs['action'] == self.NODE_DELETE:
|
||||||
self._delete_node(kwargs['peer'])
|
self._delete_node(kwargs['peer'])
|
||||||
|
|
||||||
|
def OpenWindow(self):
|
||||||
|
self._stats_dialog.show()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self._on_close()
|
||||||
|
|
||||||
def PostAlert(self, alert, context):
|
def PostAlert(self, alert, context):
|
||||||
proto, addr = self._get_peer(context.peer())
|
proto, addr = self._get_peer(context.peer())
|
||||||
|
@ -935,6 +940,3 @@ class UIService(ui_pb2_grpc.UIServicer, QtWidgets.QGraphicsObject):
|
||||||
context.cancel()
|
context.cancel()
|
||||||
|
|
||||||
return node_iter
|
return node_iter
|
||||||
|
|
||||||
def OpenWindow(self):
|
|
||||||
self._stats_dialog.show()
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue