DBus synchronous call timeout
Asked Answered
E

1

7

I have a DBus server which exposes a method that requires a huge time to complete (about 3 minutes). The client performs a synchronous call to this method.

The problem is, after exactly 25 secs the client throws an error because 'did not receive a reply'.

Unfortunately, I cannot change the client, so I cannot make the call asynchronous, as it should be.

I tried to use this line in my server configuration:

<limit name = "reply_timeout">240000</limit>

but the situation does not change.

Any idea?

Eldreeda answered 28/6, 2012 at 12:53 Comment(0)
S
9

That limit parameter configures the bus daemon, which is only one of the processes involved. The others are the client and the server, and the particular D-Bus library used on each end may have a default timeout for synchronous messages. And 25 seconds is indeed the _DBUS_DEFAULT_TIMEOUT_VALUE in libdbus, the C reference implementation.

Changing the timeout in the client, for example in dbus_connection_send_with_reply_and_block, is easier than changing the API to be asynchronous.

Seep answered 17/10, 2012 at 21:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.