From 4952f02a7ae23160e4a18eb7fa5feea1f499bc19 Mon Sep 17 00:00:00 2001 From: ShevAbam Date: Sat, 16 Apr 2016 19:18:01 +0200 Subject: [PATCH] Closing tcp connection #34 --- libs/Utils/Misc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/Utils/Misc.php b/libs/Utils/Misc.php index b654cef..7aab276 100644 --- a/libs/Utils/Misc.php +++ b/libs/Utils/Misc.php @@ -171,15 +171,14 @@ class Misc { $handle = @fsockopen($host, $port, $errno, $errstr, $timeout); - if ($handle) + if (!$handle) { - fclose($handle); - return true; + return false; } else { fclose($handle); - return false; + return true; } } elseif ($protocol == 'udp')