Skip to content

Commit

Permalink
'xdg_menu' check was redundant, 'is_closed' is not
Browse files Browse the repository at this point in the history
as the loading of menus can take a very long time and the connection may be closed by the time it has finished
  • Loading branch information
totaam committed Aug 12, 2024
1 parent 61ce837 commit 7c56e65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xpra/server/mixins/child_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ def send_xdg_menu_data(self, ss) -> None:
if ss.is_closed():
return
xdg_menu = self._get_xdg_menu_data() or {}
if ss.xdg_menu:
ss.send_setting_change("xdg-menu", xdg_menu)
if ss.is_closed():
return
ss.send_setting_change("xdg-menu", xdg_menu)
log(f"{len(xdg_menu)} menu data entries sent to {ss}")

def send_updated_menu(self, xdg_menu) -> None:
Expand Down

0 comments on commit 7c56e65

Please sign in to comment.