HTTP/Request does not close sockets
| From: | Hannes Gassert | Date: | Fri, 12 Mar 2004 23:53:45 +0000 |
| Subject: | HTTP/Request does not close sockets | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-26362@lists.php.net to get a copy of this message | ||
Hi,
I'm using HTTP/Request to do some bulk url checking of some thousand
addresses in a database. Or let's say I tried ;)
After passing some boundary, I always got nothing but that message saying
***************
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed:
Temporary failure in name resolution in /usr/share/php/Net/Socket.php on
line 106
***************
Of course, HTTP/Request does not close the sockets it is opening!
I fixed this by simply adding $this->_sock->disconnect(); on line 562 of
Request.php. You find the trivial patch for this on
http://mediagonal.ch/employees/hannes/pear/http_request_disconnect.diff.
It's my very first one, so I apologize for any stupid mistakes I might
have made.
I'm not aware of anything this patch could possibly break.
Best regards and thanks for PEAR to all of you. :)
Hannes Gassert