]> mop.ddnsfree.com - git repositories - brisk.git/commitdiff
method to identify closed socket changed
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 25 Mar 2014 07:58:02 +0000 (08:58 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Tue, 25 Mar 2014 07:58:02 +0000 (08:58 +0100)
web/Obj/sac-a-push.phh

index 27ed4c4f5f70fa9c35378aa72d9f384c0aa4cc7f..f9255c664385dc345648c7294e6a45ebaa8dbe73 100644 (file)
@@ -720,7 +720,7 @@ class Sac_a_push {
                     else {
                         $buf = fread($sock, 4096);
                         // if socket is closed
-                        if ($buf == FALSE || mb_strlen($buf, "ASCII") == 0) {
+                        if ($buf == FALSE || feof($sock)) {
                             // close socket case
                             if ($buf == FALSE) {
                                 printf("INFO: read return false\n");