Conan Exiles

Conan Exiles

Amunets Server Transfer - v1.1.29
An0maly33 30 Oct, 2022 @ 9:44pm
cluster.php bug - questions and suggestions
in cluster.php, around line 70, after
$result = $rcon->send('ast ping');

the script looks for files created by the 'pong' case block:
if (file_exists($filename)) {
...

These files do not get created until we get an 'pong' command from the server. Adding sleep() as you've done inside the foreach ping loop does not affect the result. The only way I was able to get a green result was to paste the ping-*.test files in while the foreach ping loop was running.

Is it may be because the "case 'pong'" is happening outside the foreach ping block? It would have to exit the ping block to catch the pong command that writes the files - by then the script has already decided the files don't exist.

Would it not be sufficient to do:
if ($result == 'ping done.') {
echo '<strong style="color: green;">good</strong>.';
...
?

Do we really care that the pong command created the files if the rcon response is good?

I'm running php-8.1.12 with fast-cgi from nginx-1.23.2 on Windows 11.
Last edited by An0maly33; 30 Oct, 2022 @ 10:14pm
< >
Showing 1-1 of 1 comments
LilMissHentai  [developer] 19 May, 2023 @ 5:54am 
Long story short - the script will run in two instances.

The first one is triggered by your webbrowser and will be handling the "test" cmd - which waits for the pong reply to be written.

The second one will be triggered by the server, which will execute the pong-code and write that file, then quit.

Once the second instance is done, the first instance should be able to find the file in the filesystem.
< >
Showing 1-1 of 1 comments
Per page: 1530 50