From: Matteo Nastasi (mop) Date: Tue, 25 Mar 2014 07:58:02 +0000 (+0100) Subject: method to identify closed socket changed X-Git-Tag: v4.14.0~17 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=06c425397c3120b1af1388a5176ef130a0e0cc7e;p=brisk.git method to identify closed socket changed --- diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 27ed4c4..f9255c6 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -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");