Skip to content
Snippets Groups Projects
Commit 019d351a authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

only closing socket when socket exists..

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1240 44740490-163a-0410-bde0-09ae8108e29a
parent 489f45e7
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ class sspmod_ldapstatus_LDAPTester { ...@@ -67,7 +67,7 @@ class sspmod_ldapstatus_LDAPTester {
$timeout = 1.0; $timeout = 1.0;
$socket = @fsockopen($host, $port, $errno, $errstr, $timeout); $socket = @fsockopen($host, $port, $errno, $errstr, $timeout);
@fclose($socket); if ($socket) @fclose($socket);
if ($errno) { if ($errno) {
return array(FALSE, $errno . ':' . $errstr . ' [' . $host . ':' . $port . ']'); return array(FALSE, $errno . ':' . $errstr . ' [' . $host . ':' . $port . ']');
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment