summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2022-11-16 21:50:04 +0100
committerChristian Persch <chpe@src.gnome.org>2022-11-16 21:50:04 +0100
commit0bd99057aae1160d54194a721a9bb9dcb7e328b5 (patch)
treef1f1beb99ccfc912bf89b686093507c9d6728335
parenta8bd434c10a1575d18637ab6b2378ba8a7a47c52 (diff)
downloadgnome-terminal-0bd99057aae1160d54194a721a9bb9dcb7e328b5.tar.gz
prefs: Reduce default bus timeout
https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7935
-rw-r--r--src/prefs-main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/prefs-main.cc b/src/prefs-main.cc
index 381dc989..124b46c9 100644
--- a/src/prefs-main.cc
+++ b/src/prefs-main.cc
@@ -31,6 +31,11 @@
#include "terminal-settings-bridge-backend.hh"
#include "terminal-settings-bridge-generated.h"
+// Reduce the default timeout to something that should still always work,
+// but not hang the process for long periods of time if something does
+// go wrong. See issue #7935.
+#define BRIDGE_TIMEOUT 5000 /* ms */
+
static char* arg_profile_uuid = nullptr;
static char* arg_hint = nullptr;
static int arg_bus_fd = -1;
@@ -212,6 +217,8 @@ main(int argc,
return EXIT_FAILURE;
}
+ g_dbus_proxy_set_default_timeout(G_DBUS_PROXY(bridge), BRIDGE_TIMEOUT);
+
backend = terminal_settings_bridge_backend_new(bridge);
g_dbus_connection_set_exit_on_close(connection, false);