printf("A COUNT: [%s] %d\n", $a[0], count($a));
for ($i = 0 ; $i < count($a) ; $i++) {
$b = explode('=', $a[$i]);
+ if ($b[0] == "")
+ continue;
$get[$b[0]] = urldecode($b[1]);
}
}
foreach ($this->socks as $k => $sock) {
$id = intval($sock);
if (isset($this->s2u[$id])) {
- if ($this->s2u[$id]->sess == '') {
+ if ($this->s2u[$id]->the_end) {
if ($this->s2u[$id]->rd_socket_get() != NULL) {
$this->s2u[$id]->rd_socket_set(NULL);
}
}
}
}
+ $this->app->users_cleanup();
}
function run()
$line = trim($buf);
if ($line == "reload") {
require("$DOCUMENT_ROOT/Etc/".BRISK_CONF);
- $this->app->reload($G_ban_list, $G_black_list);
+ $this->app->reload(FALSE, $G_ban_list, $G_black_list);
global_dump();
}
else if ($line == "shutdown" || $line == "sd") {
$id = intval($sock);
if (isset($this->s2u[$id])) {
$user = $this->s2u[$id];
+
+ if ($user->rd_toflush) {
+ if (fflush($sock) == FALSE)
+ continue;
+ else
+ $user->rd_toflush = FALSE;
+ }
$response = $user->rd_cache_get();
$do_ping = FALSE;
if (($this->curtime - $user->lacc) > (EXPIRE_TIME_RD / 3)) {
else {
$user->rd_cache_set("");
}
- fflush($sock);
+ if (fflush($sock) == FALSE) {
+ $user->rd_toflush = TRUE;
+ continue;
+ }
$user->rd_kalive_reset($this->curtime);
}
} // if (isset($this->s2u[$id]...
} // foreach ($this->socks...
printf("\n");
+ if (defined('CURL_DE_SAC_VERS')) {
+ $this->app->cds->process();
+ }
} // while (...
} // function run(...