function pendpage_try_addcont(&$new_socket, $tout, $method, $header, $get, $post, $cookie, $path, $addr, $rest, $cont)
{
- $pendpage = PendingPage::pendingpage_continue(&$new_socket, $this->curtime, $tout, $method,
+ $pendpage = PendingPage::pendingpage_continue( $new_socket, $this->curtime, $tout, $method,
$header, $get, $post, $cookie,
$path, $addr, $rest, $cont);
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");
}
}
}
return cmd_return(401, 'malformed cmd');
}
$idx = -1;
- if (($user = $this->app->get_user($cmd['sess'], &$idx)) == FALSE)
+ if (($user = $this->app->get_user($cmd['sess'], $idx)) == FALSE)
return cmd_return(402, 'user not found');
if (($user->flags & USER_FLAG_TY_ADMIN) == 0x00)