From 538a0d6de8e953d27fb8b0f0eb664fc33b297761 Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Sat, 11 Apr 2020 17:36:52 +0200 Subject: [PATCH] try close when socket return 0 bytes --- web/Obj/sac-a-push.phh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 4d8706b..a52b574 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -846,7 +846,7 @@ class Sac_a_push { else if ($id % SOCK_SHARD_N == $sock_shard_cur) { // already opened socket $buf = fread($sock, 4096); // if socket is closed - if ($buf == FALSE || feof($sock)) { + if ($buf == FALSE || mb_strlen($buf, "ASCII") == 0 || feof($sock)) { $postclose = NULL; // close socket case if ($buf == FALSE) { -- 2.17.1