php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59436 setTimeout usecs not honored
Submitted: 2010-09-24 05:30 UTC Modified: 2010-10-13 01:18 UTC
From: christ at ovitech dot nl Assigned:
Status: Closed Package: stomp (PECL)
PHP Version: 5.3.2 OS: Centos
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: christ at ovitech dot nl
New email:
PHP Version: OS:

 

 [2010-09-24 05:30 UTC] christ at ovitech dot nl
Description:
------------
When setting the read timeout in version 1.0.2 of the package with the values setReadTimeout(0, 200000) (200000 usecs = 0.2 seconds), the read timeout is measured to be 30 seconds, so the same as set with setReadTimeout(0). Version 1.0.0 of the package did not show this behaviour.

I've tested this by:
- Noting that the application I wrote did not respond
- Downgrading the package to 1.0.0
- Noting that the application responded a lot faster
- Upgrading to 1.0.2 again
- Noting that the application took much longer to read from the queue than with version 1.0.0 of the package.

Reproduce code:
---------------
$then = gettimeofday(true);
$broker = new Stomp('tcp://localhost:61613');
$broker->setReadTimeout(0, 200000);
$broker->subscribe('/queue/test');
$broker->readFrame();
$now = gettimeofday(true);

echo $now - $then;


Expected result:
----------------
0.20504379272461 (or something close to it)


Actual result:
--------------
200.00514507294

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-13 01:18 UTC] pierrick@php.net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/stomp


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 18:01:26 2024 UTC