X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fsac-a-push.phh;fp=web%2FObj%2Fsac-a-push.phh;h=b4ec956aac63aaa81059adaf3a9675a57d84a7de;hb=0678cbbbbf7ba11361b8716258302e276570b73e;hp=a3fe932112e2a8ab33e5d971dcbb6881ee417a68;hpb=52c0fa9acf2a28e0fd0f817fef8cc49c850f0580;p=brisk.git diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index a3fe932..b4ec956 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"); } } }