php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66504 Add getTimeout/setTimeout methods to Dbus class
Submitted: 2014-01-17 07:25 UTC Modified: 2017-10-24 08:08 UTC
Votes:12
Avg. Score:3.8 ± 1.7
Reproduced:8 of 10 (80.0%)
Same Version:8 (100.0%)
Same OS:6 (75.0%)
From: pavlonion at gmail dot com Assigned:
Status: Open Package: DBus (PECL)
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-01-17 07:25 UTC] pavlonion at gmail dot com
Description:
------------
By default D-Bus method call is limited by 25 seconds.
I believe, that it would be useful to have an ability to set and get timeout parameter for D-Bus calls.

Test script:
---------------
$dbus = new Dbus(Dbus::BUS_SYSTEM);

// If this method would exist
if (method_exists($dbus, 'setTimeout')) {
   // This is the way to set infinite timeout.
   $dbus->setTimeout(Dbus::TIMEOUT_INFINITE);
}

$proxy = $dbus->createProxy('net.php.bugs.service', '/obj', 'iface');

$timeout = $dbus->getTimeout();
echo 'Max call time is '
   .($timeout == Dbus::TIMEOUT_INFINITE? 'infinite': "$timeout seconds");

$proxy->someLongMethod();


Expected result:
----------------
Max call time is infinite

Actual result:
--------------
As a result PHP-developers, who use Dbus, will be able to set required time for Dbus methods call. That is specially useful, when one deals with long net or database interactions.

Patches

dbus-timeout.diff (last revision 2014-01-17 07:29 UTC by pavlonion at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-17 07:40 UTC] pavlonion at gmail dot com
Sorry, I misunderstood "Actual result" division...

Actual result:
--------------
Max call time is 25 seconds
 [2014-01-18 08:01 UTC] krakjoe@php.net
-Assigned To: +Assigned To: derick
 [2014-01-18 08:01 UTC] krakjoe@php.net
Assigning to derick, because he's a busy guy and probably hasn't seen this yet :)
 [2017-10-24 08:08 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: derick +Assigned To:
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:25 2019 UTC