Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.4

Bug #1692 disconnect() method is needed
Submitted: 2004-06-21 13:58 UTC
From: d-sano at cybozu dot co dot jp Assigned: avb
Status: Closed Package: HTTP_Request
PHP Version: 4.3.7 OS: WinXP
Roadmaps: (Not assigned)    
Subscription  


 [2004-06-21 13:58 UTC] d-sano at cybozu dot co dot jp
Description: ------------ This class has no method for closing connection. I think that new disconnect() method is needed. Or, if Connection:KeepAlive will not be support, simply sendRequest() method may close socket.

Comments

 [2004-07-01 13:16 UTC] koyama
If you have many requests with HTTP_Request, the count of file descriptor grow to big. Finally, it will reach to process limit, error returns. It is simple patch: --- Request.php.orig Thu Jul 1 21:44:19 2004 +++ Request.php Thu Jul 1 21:46:20 2004 @@ -619,7 +619,8 @@ } elseif ($this->_allowRedirects AND $this->_redirects > $this->_maxRed irects) { return PEAR::raiseError('Too many redirects'); } - + + $this->_sock->disconnect(); return true; }
 [2004-07-11 22:16 UTC] gurugeek
Dear Maintainer, Your package http_request has currently 2 open bugs. We urge you to take the necessary steps to solve the reported issues at your soonest convenience. If the bug issue hasn’t been addressed yet you are kindly asked to take the necessary steps to ensure a prompt resolution of the problem. If you already addressed the reported problem feel free to change the bug status as soon as possible. Regards David Costa PEAR Quality Assurance pear-qa@lists.php.net
 [2004-07-14 14:30 UTC] avb
Since Keep-Alive is not supported, an easiest solution would be to add a disconnect() call, as suggested by koyama at hoge dot org. Will do soon.
 [2004-08-26 15:07 UTC] meebey
I found this bug too today, it broke our nice PEAR IRC bot (PEARgirl) on #pear efnet. Since it runs as a daemon the script never ends, each request will make a new connection. After a week we got over 1000 not closed connections: root@server-4:~# netstat -plan|grep php|wc -l 1020 so new connections are not possible from this script... I think this bug is very important to fix, its something like memory leaks. I am changing the bug-type to bug.
 [2004-09-03 15:33 UTC] avb
Fixed in CVS