Skip to content

Commit

Permalink
[fix] ob_flush() error in LGSL7
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosenstein authored Sep 10, 2024
1 parent 456ba38 commit 16e0679
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lgsl_cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$db_query = "SELECT `type`,`ip`,`c_port`,`q_port`,`s_port` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `disabled`= 0 ORDER BY `cache_time` ASC;";
$db_result = $db->query($db_query);

if (ob_get_level() == 0) ob_start();
foreach ($db_result as $db_row) {
echo str_pad(LGSL::timer("taken"), 8, " ").":".
str_pad($db_row['type'], 15, " ").":".
Expand All @@ -35,8 +36,9 @@
$server = new Server(["type" => $db_row['type'], "ip" => $db_row['ip'], "c_port" => $db_row['c_port'], "q_port" => $db_row['q_port']]);
$server->queryCached($request);

flush();
ob_flush();
flush();
}
ob_end_flush();

echo "\r\nFINISHED</pre>";

0 comments on commit 16e0679

Please sign in to comment.