Edit report at http://pear.php.net/bugs/bug.php?id=14233&edit=1

ID: 14233
Updated by: hostmaster@shupp.org
Reported By: phatduckk at yahoo dot com
Summary: Add a timeout to __get() to prevennt indefinite block
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: Services_Digg
Operating System: OS X 10.5
Package Version: 0.4.4
PHP Version: 5.2.6
-Assigned To:
+Assigned To: shupp
Roadmap Versions:
New Comment:

-Status: Open
+Status: Wont fix
-Assigned To:
+Assigned To: shupp
This package is being deprecated, and superseded by Services_Digg2.

Previous Comments:

[2008-07-26 09:42:18] doconnor

Hey Arin,
Has this happened to you much in the real world?

I ask because I'm inclined at first glance to say ... 'well, just let
it hang' until the max execution time of the script is reached - ie,
don't re-invent what's at a network stack level in PHP.

That being said, if it's happened repeatably...


[2008-06-25 03:11:43] arin

There's a possibility for this class to hang in __get.

If the socket actually gets created in the initialize method there's no

guarantee that it won't "hang" during the socket_read call(s) in

socket_read doesn't have a timeout... so you could sit around waiting

Test script:
Pass __construct an endpoint that you control. In the endpoint's
executing script just enter something like this:

sleep (500);
echo "hello";

When the Services_Digg_Request's __get method is executed you'll see
that the socket_read will wait until the endpoint's script is done
sleeping for 500 seconds.

Expected result:
The __get method should timeout after some specified # of seconds.

Actual result:
__get just sits around waiting for the endpoint to respond.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedJun 5, '10 at 7:12p
activeJun 5, '10 at 7:12p

1 user in discussion

Hostmaster: 1 post



site design / logo © 2022 Grokbase