X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fsac-a-push.phh;h=05c24ce3ec6ab226189cafdb8f16a95f18b3216d;hb=a16d8054d9577795a6d9306570eb3a06c46da147;hp=46227fcc588e51131fbd5f7c0eeed2487247daa0;hpb=828872a069b4092703067ee5df3d4cc8bbb334ca;p=brisk.git diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index 46227fc..05c24ce 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -631,14 +631,18 @@ class Sac_a_push { foreach ($this->socks as $k => $sock) { $id = intval($sock); if (isset($this->s2u[$id])) { - if ($this->s2u[$id]->the_end) { - if ($this->s2u[$id]->rd_socket_get() != NULL) { - $this->s2u[$id]->rd_socket_set(NULL); + $user = $this->s2u[$id]; + if ($user->the_end) { + if (($user->rd_toflush == FALSE && $user->rd_step == $user->step) + || $user->rd_endtime_is_expired($this->curtime)) { + if ($user->rd_socket_get() != NULL) { + $user->rd_socket_set(NULL); + } + unset($this->socks[$id]); + unset($this->s2u[$id]); + fclose($sock); + printf("CLOSE ON GARBAGE MANAGER\n"); } - unset($this->socks[$id]); - unset($this->s2u[$id]); - fclose($sock); - printf("CLOSE ON GARBAGE MANAGER\n"); } } }