GDBus GIO: no timeout for D-Bus method invocations
When calling a method, give the peer unlimited time to reply. Relevant in particular for local sync, where the time for processing a message is basically unpredictable. Communication with the D-Bus daemon still uses the default timeout.
This commit is contained in:
parent
b437a01f9e
commit
616d51b34c
1 changed files with 3 additions and 2 deletions
|
@ -1894,7 +1894,7 @@ class DBusWatch : public Watch
|
|||
g_variant_new("(s)", peer),
|
||||
G_VARIANT_TYPE("(b)"),
|
||||
G_DBUS_CALL_FLAGS_NONE,
|
||||
-1,
|
||||
-1, // default timeout
|
||||
NULL,
|
||||
&error);
|
||||
|
||||
|
@ -3964,7 +3964,8 @@ protected:
|
|||
{
|
||||
CallbackData *data = new CallbackData(m_conn, callback);
|
||||
g_dbus_connection_send_message_with_reply(m_conn.get(), msg.get(), G_DBUS_SEND_MESSAGE_FLAGS_NONE,
|
||||
-1, NULL, NULL, m_dbusCallback, data);
|
||||
G_MAXINT, // no timeout
|
||||
NULL, NULL, m_dbusCallback, data);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue