php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40041 fsockopen doesn't close socket at timeout
Submitted: 2007-01-06 08:31 UTC Modified: 2007-01-06 16:45 UTC
From: nhnui dot mail at gmail dot com Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 5.2.0 OS: windows 2003
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nhnui dot mail at gmail dot com
New email:
PHP Version: OS:

 

 [2007-01-06 08:31 UTC] nhnui dot mail at gmail dot com
Description:
------------
when fsockopen() can't connect within timeout it doesn't close the opened socked

I discovered this using Process Explorer

Reproduce code:
---------------
$fp=fsockopen($some_unreachable_ip,$some_port,$errno,$errstr,$some_timeout);
if ($fp)
  fclose($fp);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-06 16:45 UTC] iliaa@php.net
If fsockopen() timesout while trying to open a socket it won't 
return you a socket resource to close.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 16:01:30 2024 UTC